You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that jest can not properly interpret the index.js file, since it is using imports and is not in commonjs format unlike the compiled TS portions of the code base.
👟 Reproduction steps
Use jest to run *.js files instead of using ts-jest, etc. Useful, because there are some challenges with ts-jest and we can run tests on *.js after TS files are compiled down to commonjs.
👍 Expected behavior
It should not have a syntax error when parsing.
👎 Actual Behavior with Screenshots
@appbloks/storage:test: ● Test suite failed to run
@appbloks/storage:test:
@appbloks/storage:test: test/node_modules/.pnpm/@traceloop+jest-environment-otel@0.8.0/node_modules/@traceloop/jest-environment-otel/index.js:1
@appbloks/storage:test: import { teardown, setup } from './dist/global';
@appbloks/storage:test: ^^^^^^
@appbloks/storage:test:
@appbloks/storage:test: SyntaxError: Cannot use import statement outside a module
🤖 Node Version
v18.10.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
I checked and didn't find similar issue
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered:
FYI, looks like this issue is related to issue #34. I was able to convert the remainder to typescript locally and rebuild and had no issues importing the environment after that.
📜 Description
It appears that jest can not properly interpret the index.js file, since it is using imports and is not in commonjs format unlike the compiled TS portions of the code base.
👟 Reproduction steps
Use jest to run *.js files instead of using ts-jest, etc. Useful, because there are some challenges with ts-jest and we can run tests on *.js after TS files are compiled down to commonjs.
👍 Expected behavior
It should not have a syntax error when parsing.
👎 Actual Behavior with Screenshots
@appbloks/storage:test: ● Test suite failed to run
@appbloks/storage:test:
@appbloks/storage:test: test/node_modules/.pnpm/@traceloop+jest-environment-otel@0.8.0/node_modules/@traceloop/jest-environment-otel/index.js:1
@appbloks/storage:test: import { teardown, setup } from './dist/global';
@appbloks/storage:test: ^^^^^^
@appbloks/storage:test:
@appbloks/storage:test: SyntaxError: Cannot use import statement outside a module
🤖 Node Version
v18.10.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: