oxc/tasks/coverage
Boshen a558492bf9 feat(codegen): implement BinaryExpressionVisitor (#4548)
part of https://github.com/oxc-project/backlog/issues/58

`monitor-oxc` run: https://github.com/oxc-project/monitor-oxc/actions/runs/10179047831
binary expression stack length tally using `counts` in top 100 npm packages from monitor-oxc:

```
29772 counts
(  1)    17652 (59.3%, 59.3%): 0
(  2)     5772 (19.4%, 78.7%): 1
(  3)     3204 (10.8%, 89.4%): 2
(  4)     1276 ( 4.3%, 93.7%): 3
(  5)      616 ( 2.1%, 95.8%): 4
(  6)      308 ( 1.0%, 96.8%): 5
(  7)      202 ( 0.7%, 97.5%): 6
(  8)      168 ( 0.6%, 98.1%): 7
(  9)      114 ( 0.4%, 98.5%): 9
( 10)       90 ( 0.3%, 98.8%): 8
( 11)       84 ( 0.3%, 99.0%): 13
( 12)       58 ( 0.2%, 99.2%): 10
( 13)       48 ( 0.2%, 99.4%): 12
( 14)       32 ( 0.1%, 99.5%): 11
( 15)       20 ( 0.1%, 99.6%): 134
( 16)       16 ( 0.1%, 99.6%): 18
( 17)       16 ( 0.1%, 99.7%): 20
( 18)       12 ( 0.0%, 99.7%): 19
( 19)       12 ( 0.0%, 99.8%): 35
( 20)       12 ( 0.0%, 99.8%): 51
( 21)       10 ( 0.0%, 99.8%): 15
( 22)        6 ( 0.0%, 99.9%): 17
( 23)        6 ( 0.0%, 99.9%): 21
( 24)        6 ( 0.0%, 99.9%): 45
( 25)        4 ( 0.0%, 99.9%): 14
( 26)        4 ( 0.0%, 99.9%): 26
( 27)        4 ( 0.0%, 99.9%): 53
( 28)        2 ( 0.0%, 99.9%): 172
( 29)        2 ( 0.0%, 99.9%): 214
( 30)        2 ( 0.0%,100.0%): 22
( 31)        2 ( 0.0%,100.0%): 27
( 32)        2 ( 0.0%,100.0%): 28
( 33)        2 ( 0.0%,100.0%): 29
( 34)        2 ( 0.0%,100.0%): 31
( 35)        2 ( 0.0%,100.0%): 36
( 36)        2 ( 0.0%,100.0%): 46
( 37)        2 ( 0.0%,100.0%): 55
```
2024-07-31 12:44:19 +00:00
..
misc fix(parser): fix enum member parsing (#4543) 2024-07-30 10:43:09 +00:00
src feat(coverage): run multi-file typescript tests (#4256) 2024-07-16 06:15:04 +00:00
Cargo.toml chore: turn off doctest for all [[bin]] 2024-07-14 16:55:19 +08:00
codegen_babel.snap chore: bump test262, babel and TypeScript submodules (#3644) 2024-06-12 18:42:32 +08:00
codegen_misc.snap fix(parser): fix enum member parsing (#4543) 2024-07-30 10:43:09 +00:00
codegen_runtime_test262.snap feat(codegen): improve codegen formatting (#3731) 2024-06-18 04:14:10 +00:00
codegen_sourcemap.snap feat(codegen): implement BinaryExpressionVisitor (#4548) 2024-07-31 12:44:19 +00:00
codegen_test262.snap chore: bump test262, babel and TypeScript submodules (#3644) 2024-06-12 18:42:32 +08:00
codegen_typescript.snap feat(coverage): run multi-file typescript tests (#4256) 2024-07-16 06:15:04 +00:00
minifier_babel.snap chore: bump test262, babel and TypeScript submodules (#3644) 2024-06-12 18:42:32 +08:00
minifier_test262.snap fix(codegen): fixes for esbuild test cases (#4503) 2024-07-28 08:57:15 +00:00
parser_babel.snap refactor(parser): use error codes for ts diagnostics (#4335) 2024-07-18 16:09:25 +00:00
parser_misc.snap fix(parser): fix enum member parsing (#4543) 2024-07-30 10:43:09 +00:00
parser_test262.snap refactor(parser): use error codes for ts diagnostics (#4335) 2024-07-18 16:09:25 +00:00
parser_typescript.snap fix(parser): fix enum member parsing (#4543) 2024-07-30 10:43:09 +00:00
prettier_babel.snap feat(parser): parse modifiers with parse_modifiers (take 2) (#3977) 2024-06-30 03:46:34 +00:00
prettier_misc.snap chore(coverage): add test for huge binary expression and nested if statements (#4084) 2024-07-08 00:15:26 +08:00
prettier_test262.snap feat(parser): parse modifiers with parse_modifiers (take 2) (#3977) 2024-06-30 03:46:34 +00:00
prettier_typescript.snap refactor(parser): use function instead of trait to parse list with rest element (#4028) 2024-07-02 13:43:14 +00:00
README.md chore: bump test262, babel and TypeScript submodules (#3644) 2024-06-12 18:42:32 +08:00
transformer_babel.snap feat(parser): parse modifiers with parse_modifiers (take 2) (#3977) 2024-06-30 03:46:34 +00:00
transformer_misc.snap fix(parser): fix enum member parsing (#4543) 2024-07-30 10:43:09 +00:00
transformer_test262.snap chore: bump test262, babel and TypeScript submodules (#3644) 2024-06-12 18:42:32 +08:00
transformer_typescript.snap feat(semantic): add ReferenceFlags::TSTypeQuery to indicate referenced by TSTypeQuery (#4317) 2024-07-17 09:52:57 +00:00
transpile.snap fix(codegen): print parenthesis properly (#4245) 2024-07-14 04:13:10 +00:00

Coverage

Tools are tested against test262, babel and TypeScript for conformance.

Clone the test repositories beforehand:

just submodules

Development

# full run
cargo coverage
cargo coverage js # for test262
cargo coverage babel # for babel
cargo coverage ts # for typescript

# run in watch
cargo watch -x 'coverage js'

# filter for a file path
cargo watch -x 'coverage js --filter filter-file-path'

# find crash scene by turning off rayon and print out the test cases in serial
cargo coverage -- --debug

# Run after submodules are updated
UPDATE_SNAPSHOT=1 just c