-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update tests to work with newest node LTS #79
Comments
Hi @CluEleSsUK, I'm interested in working on this issue. I'm from PLDG, and I have experience with Node.js and Jest. Could you please assign this issue to me? |
done @paschal533 - thanks for your help!! |
Hi @CluEleSsUK I cloned the project and ran the tests on Node.js version 22.13.0. The only tests that initially failed were: test('Beacon fetching works with testnet', async () => {
await endToEndTest('https://pl-us.testnet.drand.sh');
});
test('Beacon fetching works with mainnet', async () => {
await endToEndTest('https://api.drand.sh');
}); However, after adding module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testTimeout: 30000,
transform: {
"^.+\\.ts?$": "ts-jest",
},
transformIgnorePatterns: ["<rootDir>/node_modules/"],
}; Could you confirm if the issue lies elsewhere or if there’s additional context I might be missing? I'd be happy to investigate further if needed. |
interesting! Could you try updating the GitHub action to run on a newer version and see if it builds successfully? |
Hi @CluEleSsUK I’ve updated the GitHub Action to use Node.js version 22.x and created a pull request to test the pipeline. The tests ran successfully with this change, including the previously failing ones. Would you like me to proceed with any further updates or optimizations? |
All the jest-http-mock tests fail on the latest LTS version of node, as they appear to use actual
fetch
rather than the mock (presumably becausefetch
is now available on LTS)The text was updated successfully, but these errors were encountered: