import downstream from "./downstream.js";
import preprocess from "./preprocess.js";
import shim from "./shim.js";
import sourcemap from "./sourcemap.js";
import testcases from "./testcases.js";
import { Harness } from "./utils.js";

main();

async function main() {
  const harness = new Harness();

  downstream(harness);
  preprocess(harness);
  shim(harness);
  sourcemap(harness);
  testcases(harness);

  const failures = await harness.run(process.argv);
  if (failures) {
    process.exit(1);
  }
}
