Testing and Tools

Tests

Test deno:

  1. # Run the whole suite:
  2. cargo test
  3. # Only test cli/tests/unit/:
  4. cargo test js_unit_tests

Test std/:

  1. cargo test std_tests

Lint and format

Lint the code:

  1. deno run -A --unstable ./tools/lint.js

Format the code:

  1. deno run -A --unstable ./tools/format.js

Continuous Benchmarks

See our benchmarks over here

The benchmark chart supposes https://github.com/denoland/benchmark_data/blob/gh-pages/data.json has the type BenchmarkData[] where BenchmarkData is defined like the below:

  1. interface ExecTimeData {
  2. mean: number;
  3. stddev: number;
  4. user: number;
  5. system: number;
  6. min: number;
  7. max: number;
  8. }
  9. interface BenchmarkData {
  10. created_at: string;
  11. sha1: string;
  12. benchmark: {
  13. [key: string]: ExecTimeData;
  14. };
  15. binarySizeData: {
  16. [key: string]: number;
  17. };
  18. threadCountData: {
  19. [key: string]: number;
  20. };
  21. syscallCountData: {
  22. [key: string]: number;
  23. };
  24. }