-
Notifications
You must be signed in to change notification settings - Fork 333
Usage with Jest #191
Comments
I'll treat this as a feature request for a more robust |
Not entirely Benchmark's fault since Jest defaults to a jsdom environment 😄 Benchmark works as expected when the environment is set to node at the top of a test file.
|
I have the same error on repl.it: |
I have the same error as well in Jest. |
Same error in CodeSandbox: https://codesandbox.io/s/30l42zjjv1 |
I could get it to work if I set the Maybe someone can confirm 😇? module.exports = {
testEnvironment: 'node',
...
}; |
What if I have code that needs to run in jsdom - is there a way to hack support.browser to be false? :) |
There's a jest reporter now, https://github.com/pckhoi/jest-bench - just wondering how to use it to create a baseline... |
Attempting to run benchmark within Jest errors with:
It appears that Benchmark believes it's inside a browser environment via
supports.browser
. If I hack that boolean to false everything runs happily.Is there a way to force
supports.browser
to false in a config?Or is there a recommended approach for use within Jest tests?
The text was updated successfully, but these errors were encountered: