jsperf.com icon indicating copy to clipboard operation
jsperf.com copied to clipboard

Doesn't work with modern JS?

Open mindplay-dk opened this issue 5 years ago • 0 comments

This test fails with a cryptic error message:

https://jsperf.com/array-search-sets

ReferenceError: result is not defined.

Tests always seem to fail whenever I use modern keywords like const?

Or is this because setup/teardown and test-code isn't all defined/running in the same scope? (if so, how is teardown useful without being able to access any of the results generated by the tests?)

(I'd assume every test runs in a new iframe with setup, test-code and teardown "pasted" after each other, or how else does it work? how else would you get reliable results?)

It would be helpful if you could console.error after you catch, as currently there's no way to see which line generated the error.

Also, the preparation code rendering is broken, with two weird nested containers and some <script> tags showing up on the page - I have no idea if this is related.

scrolling-bug

mindplay-dk avatar Jan 05 '20 11:01 mindplay-dk