Skip to content
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

upgrade jest to fix broken tests due to modules imports #54

Conversation

fedordikarev
Copy link
Contributor

That fixes error with test/webhooks.test.ts:

ENOENT: no such file or directory, open 'node:path'

Issue was due to some packages started to use require("node:path") imports format, that wasn't support by Jest 26.
It was addressed and fixed in jestjs/jest#11637, so upgrading Jest would work there.

As follow-up, we also need to upgrade base docker image, as Jest 29 doesn't work with node:12

Ref: jestjs/jest#11637

`webhooks.test.ts` was broken due to importing system modules
with "node:" prefix and failing with:

```
ENOENT: no such file or directory, open 'node:path'
```
@fedordikarev fedordikarev changed the title upgrade jest to fix broken modules imports upgrade jest to fix broken tests due to modules imports Aug 25, 2024
@antelman107
Copy link
Contributor

antelman107 commented Aug 26, 2024

@fedordikarev
Copy link
Contributor Author

ok, I tested locally with node 22.
Currently it doesn't work as some dependencies still require more up-to-date node version:

npm WARN EBADENGINE   required: { node: '>= 18' }

(you could check "Install dependencies step" from workflow)
Lets try with node18 (I will push changes for that) and consider further upgrade later

@fedordikarev
Copy link
Contributor Author

fedordikarev commented Aug 26, 2024

@antelman107 could you take a look if upgrade to node18 fix it? (review changes, approve and run the workflow?)

@fedordikarev
Copy link
Contributor Author

ok... I will think about that as same changes fix tests localy, using act to run GH Actions localy and inside my branch: https://github.com/fedordikarev/neondatabase-github-automations/actions/runs/10559237154/job/29250261280

I will reach you back when I found anything related
@antelman107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants