You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,27 @@ This will run the benchmark served by `http://localhost:3000/benchmarks/example/
41
41
42
42
Note: You can also run benchmarks directly in a browser. To do so, visit its URL and invoke `window.startTest().then(console.table);` on the Console.
43
43
44
+
### Choosing which browser to run the benchmarks in
45
+
46
+
To select which browser to test things in, use the `--browser` option.
47
+
48
+
```bash
49
+
npm run benchmark example -- --browser=firefox
50
+
```
51
+
52
+
Supported options:
53
+
54
+
-`chrome` = Use Chrome
55
+
-`firefox`= Use Firefox
56
+
57
+
The default used browser is `chrome`.
58
+
59
+
A note will be printed on screen to show which version you are using. For example:
60
+
61
+
```
62
+
ℹ️ Running benchmark using browser firefox (firefox/129.0a1)
63
+
```
64
+
44
65
## Creating a benchmark
45
66
46
67
Benchmarks are HTML pages stored in a subfolder in `./src/benchmarks/`. The page **MUST** expose a `window.startTest` method which returns a promise. When the test logic is done, it **MUST** resolve that promise.
0 commit comments