2020-05-06 18:21:13 -04:00
|
|
|
## Testing and Tools
|
|
|
|
|
|
|
|
### Tests
|
|
|
|
|
|
|
|
Test `deno`:
|
|
|
|
|
2020-05-09 21:09:42 -04:00
|
|
|
```shell
|
2020-05-06 18:21:13 -04:00
|
|
|
# Run the whole suite:
|
|
|
|
cargo test
|
|
|
|
|
2020-10-03 16:16:13 -04:00
|
|
|
# Only test cli/tests/unit/:
|
2020-05-06 18:21:13 -04:00
|
|
|
cargo test js_unit_tests
|
|
|
|
```
|
|
|
|
|
|
|
|
Test `std/`:
|
|
|
|
|
2020-05-09 21:09:42 -04:00
|
|
|
```shell
|
2020-05-06 18:21:13 -04:00
|
|
|
cargo test std_tests
|
|
|
|
```
|
|
|
|
|
|
|
|
### Lint and format
|
|
|
|
|
|
|
|
Lint the code:
|
|
|
|
|
2020-05-09 21:09:42 -04:00
|
|
|
```shell
|
2020-11-05 09:53:21 -05:00
|
|
|
deno run -A --unstable ./tools/lint.js
|
2020-05-06 18:21:13 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Format the code:
|
|
|
|
|
2020-05-09 21:09:42 -04:00
|
|
|
```shell
|
2020-11-05 09:53:21 -05:00
|
|
|
deno run -A --unstable ./tools/format.js
|
2020-05-06 18:21:13 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
### Continuous Benchmarks
|
|
|
|
|
|
|
|
See our benchmarks [over here](https://deno.land/benchmarks)
|
|
|
|
|
|
|
|
The benchmark chart supposes
|
2020-05-19 15:25:38 -04:00
|
|
|
https://github.com/denoland/benchmark_data/blob/gh-pages/data.json has the type
|
2020-05-06 18:21:13 -04:00
|
|
|
`BenchmarkData[]` where `BenchmarkData` is defined like the below:
|
|
|
|
|
|
|
|
```ts
|
|
|
|
interface ExecTimeData {
|
|
|
|
mean: number;
|
|
|
|
stddev: number;
|
|
|
|
user: number;
|
|
|
|
system: number;
|
|
|
|
min: number;
|
|
|
|
max: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface BenchmarkData {
|
|
|
|
created_at: string;
|
|
|
|
sha1: string;
|
|
|
|
benchmark: {
|
|
|
|
[key: string]: ExecTimeData;
|
|
|
|
};
|
|
|
|
binarySizeData: {
|
|
|
|
[key: string]: number;
|
|
|
|
};
|
|
|
|
threadCountData: {
|
|
|
|
[key: string]: number;
|
|
|
|
};
|
|
|
|
syscallCountData: {
|
|
|
|
[key: string]: number;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
```
|