Update to Jest 27 to get a resolver version that supports node: syntax for built-ins, to unblock marked-terminal update (#662).
Initially a few tests were failing with ENOENT: no such file or directory, lstat '<repo path>/node_modules/jest-worker/build/index.js'. I figured out this was because Jest 27 sometimes tries to delay-load jest-worker in the test result reporting stage, which caused errors in tests using mock-fs if they didn't call mockfs.restore() after each test. So the fix is to update the tests to restore in afterEach.
I also added proper launch configurations for debugging tests, and removed a custom internal Jest reporter that was intended for Azure DevOps builds with failOnStderr (or maybe it was from further back when this repo used Rush) and isn't needed now.
Update to Jest 27 to get a resolver version that supports
node:
syntax for built-ins, to unblockmarked-terminal
update (#662).Initially a few tests were failing with
ENOENT: no such file or directory, lstat '<repo path>/node_modules/jest-worker/build/index.js'
. I figured out this was because Jest 27 sometimes tries to delay-loadjest-worker
in the test result reporting stage, which caused errors in tests usingmock-fs
if they didn't callmockfs.restore()
after each test. So the fix is to update the tests to restore inafterEach
.I also added proper launch configurations for debugging tests, and removed a custom internal Jest reporter that was intended for Azure DevOps builds with
failOnStderr
(or maybe it was from further back when this repo used Rush) and isn't needed now.