1
0

test-rust.mjs 335 B

123456789101112
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. import { workingDirectory } from '../utils.mjs';
  4. // Run the tests.
  5. cd(path.join(workingDirectory, 'clients', 'rust'));
  6. const hasSolfmt = await which('solfmt', { nothrow: true });
  7. if (hasSolfmt) {
  8. await $`cargo test-sbf ${argv._} 2>&1 | solfmt`;
  9. } else {
  10. await $`cargo test-sbf ${argv._}`;
  11. }