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

Node v20 + Jest = Polyfill error with fast-text-encoding #121

Open
hochoy opened this issue Jul 5, 2023 · 0 comments
Open

Node v20 + Jest = Polyfill error with fast-text-encoding #121

hochoy opened this issue Jul 5, 2023 · 0 comments

Comments

@hochoy
Copy link

hochoy commented Jul 5, 2023

Expected Behaviour

SDK should not have polyfill issues when running Jest tests

Actual Behaviour

SDK has polyfill TypeError when running Jest tests
Screen Shot 2023-07-05 at 12 29 53 AM

Steps to Reproduce

Readme describes it best: https://github.com/hochoy/adobe-target-jest-node-compatibility/blob/main/README.md
The bug is reproduced in the minimal repo above.

Here's the gist of it

npm i @adobe/target-nodejs-sdk
npm i --save-dev jest

touch index.js
# import the sdk
touch index.test.js
# write a jest test requiring the MarketingCloudClient

nvm install 20
nvm use 20
npx jest index.test.js

Platform and Version

@adobe/target-nodejs-sdk v2.4.3
node v20.3.1
jest v29.6.0

Sample Code that illustrates the problem

https://github.com/hochoy/adobe-target-jest-node-compatibility/tree/main

Logs taken while reproducing problem

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

No branches or pull requests

1 participant