Tests: align test runner with other repos#2234
Conversation
| "Promise": false, | ||
| "require": false | ||
| "require": false, | ||
| "Set": false |
There was a problem hiding this comment.
This shouldn’t be required. Since we’re running a relatively new Node.js in the runner, we should just declare all globals for a proper ECMAScript version instead of adding them one by one.
There was a problem hiding this comment.
I didn't think so either, but the ecma version was set and they were still throwing errors.
There was a problem hiding this comment.
Because setting ecmaVersion does not set the environment - but setting the environment does set the ecmaVersion. You need to add the environment. You can the optionally drop ecmaVersion but I guess it may be easier to migrate to flat config later if it stays.
There was a problem hiding this comment.
But the environment is also set using node: true above.
There was a problem hiding this comment.
Not this environment; the ECMAScript one. es2022 or whichever version we can rely on.
There was a problem hiding this comment.
Ah, ok, I'm not used to using more then node or browser.
There was a problem hiding this comment.
The ecmaVersion was already set to 2022, but that still didn't add globals. However, using es6: true in the env does work (there is no env for es2022). I like the flat way of doing this better, but this should work for now.
There was a problem hiding this comment.
Interesting; there should be env’s for all ES versions: https://eslint.org/docs/latest/use/configure/language-options-deprecated
I expect to migrate to the flat config eventually, though; it shouldn’t require too much work.
This aligns the test runner code with the most recent changes from core, migrate, and color. Workflows have not changed, but browserstack can be run locally.