-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: run tests on node.js v21 nightly #199
Conversation
Hey everyone I tried resolving things here but encountered the upstream error reported here nodejs/node#47614 Also, there seems to be a separate issue where the loader isn't engaged by the ava unit tests. I tried using this alternative syntax in the tests-ava package.json but the loader wasn't engaged... {
"ava": {
"nodeArguments": [
"--loader=esmock"
]
}
} Feel free to leave any input or advice. Thanks for pushing v20 tests @aladdin-add |
the ava issue is reproduced and reported here avajs/ava#3195 |
as the will give it a try if no objections. 😄 |
looks like the node.js v20-nightly is still failing. |
43b9829
to
77799d4
Compare
this branch is rebased on the latest master which handles async |
The nightly used in the tests appears to be an older nightly 20.0.0-nightly202304181c3d741cb0 as indicated by the timestamp in the name. We will want 20230514 seen here https://nodejs.org/download/nightly/ |
tests for all folders fail when run from the latest nightly... I won't have bandwidth to investigate further until end of week the problem appears to be here https://github.com/iambumblehead/esmock/blob/master/src/esmockLoader.js#L37 global.esmockTreeIdGet(parentURL.match(esmkIdRe)[0].split('=')[1]) The loader and test contexts are separated. we don't really need to access the test namespace this way and we could instead import the mocked module with the full serialized uri. The reason we exchanged the small esmkId with the full url is, when the test failed the longer url would be printed by the failing test adding noise to the failing test which made the stacktrace harder to read... |
if anyone here knows generally the way data should be communicated from test to loader, feel free to leave incomplete advice. If there is a generally-recommended approach, I might be able to add it this evening |
let's try to implement this way, if there are no other suggestions nodejs/node#44710 (comment) |
I have a passing test here that uses worker thread to define the longer uri in the loader, but cannot use this machine to push up any changes so it might take some time before anything reaches this branch |
I thought these changes were developed around node 21 but it looks like node 19 was used :/ |
When using node 21 nightly here, changes fail for ava's test folder, but they pass for the other test-runners. |
ava does not work with node v20+ loaders at all https://github.com/iambumblehead/nodejs-v20-loader-ava-noop |
@koshic @aladdin-add @Swivelgames @tripodsan the tests are passing yay. feel free to leave opinions, concerns or suggestions |
title says enable node v20 but currently only nightly-v21 is used. That should be reflected in the title or in the code |
@flovogt okay, which do you recommend? |
@flovogt the title is updated |
I think it's better to merge it ASAP and publish new package version. We can improve loader-userspace logic interaction later. |
a new PR adding node v20 tests to the ci pipeline is created #202 |
No description provided.