test-unit.mjs 324 B

1234567891011121314
  1. #!/usr/bin/env zx
  2. import { $, argv } from 'zx';
  3. $.stdio = 'inherit';
  4. const platform = argv._[0];
  5. const watch = argv.watch;
  6. const testArgs = ['--config', `../../node_modules/@kinobi-so/internals/vitest.config.${platform}.mts`];
  7. if (watch) {
  8. await $`vitest ${testArgs}`;
  9. } else {
  10. await $`vitest run ${testArgs}`;
  11. }