Commit c1db8c7
committed
Fix --test for d8 shell runner
There seems to be two bugs when running
`d8 cli.js -- --test <subset>`:
1. A typo in cli.js (`cliParams.get("tests")` should've been
`cliParams.get("test")`) which leads to
```
cli.js:122: TypeError: Cannot read properties of undefined (reading 'split')
let tests = cliParams.has("test") ? cliParams.get("tests").split(",") : []
^
TypeError: Cannot read properties of undefined (reading 'split')
at cli.js:122:63
```
2. performance.mark/performance.measure in d8 requires PerformanceMark
objects as arguments and do not take mark name strings.
```
./JetStreamDriver.js:3233: Error: Couldn't find benchmark named "true"
throw new Error(`Couldn't find benchmark named "${name}"`);
^
Error: Couldn't find benchmark named "true"
at findBenchmarkByName (./JetStreamDriver.js:3233:15)
at processTestList (./JetStreamDriver.js:3223:29)
at ./JetStreamDriver.js:3261:18
at cli.js:143:1
cli.js:143: Error: Error executing file: "./JetStreamDriver.js"
load("./JetStreamDriver.js");
^
Error: Error executing file: "./JetStreamDriver.js"
at cli.js:143:1
```
This patch fixes the typo in 1. For 2, since these are only used for
UI annotations, replace them with no-ops in d8 instead.1 parent de88e36 commit c1db8c7
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments