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

ENOENT: no such file or directory, open 'node:assert' #245

Open
1 task done
manthinaa opened this issue Nov 20, 2024 · 1 comment
Open
1 task done

ENOENT: no such file or directory, open 'node:assert' #245

manthinaa opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@manthinaa
Copy link

manthinaa commented Nov 20, 2024

Checklist

  • I have read Caveats documentation and didn't find a solution for this problem there.

Bug description

I am getting following on error on require('aws-sdk-client-mock-jest');:
ENOENT: no such file or directory, open 'node:assert' require('aws-sdk-client-mock-jest'); at Runtime.readFile (node_modules/jest-runtime/build/index.js:1987:21) at Object.<anonymous> (node_modules/aws-sdk-client-mock-jest/src/jestMatchers.ts:2:1) at Object.<anonymous> (node_modules/aws-sdk-client-mock-jest/src/jest.ts:5:1)

I am working nodejs-20.

Could you please provide needful information, thank you.

Reproduction

require('aws-sdk-client-mock-jest');

Environment

  • Node version: v20.18.0
    This was introduced from 4.1.0, in jestMatchers.js
@manthinaa manthinaa added the bug Something isn't working label Nov 20, 2024
@manthinaa
Copy link
Author

Package.json:
"jest": {
"globals": {
"axiosTimeout": 60000
},
"setupFilesAfterEnv": [
"jest-extended/all",
"./setup-jest.js"
],
"moduleDirectories": [
"node_modules",
"lib"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"/node_modules/",
"/templates/",
"/tests/",
"/data/",
"/mocks/"
],
"moduleNameMapper": {
"@lib(.)$": "/src/lib$1",
"@tests(.
)$": "/tests$1",
"@factories(.*)$": "/tests/factories$1"
},
"coverageReporters": [
"text"
],
"reporters": [
"default",
"jest-junit"
]
},
"jest-junit": {
"outputDirectory": "./reports",
"outputName": "junit.xml",
"uniqueOutputName": false,
"classNameTemplate": "{classname}-{title}",
"titleTemplate": "{classname}-{title}",
"ancestorSeparator": " › ",
"usePathForSuiteName": true
}
"devDependencies": {
"@types/jest": "^26.0.3",
"aws-sdk-client-mock": "^4.1.0",
"aws-sdk-client-mock-jest": "^4.1.0",
"jest": "26.1.0",
"jest-extended": "^1.2.0",
"jest-junit": "^13.0.0",
"jest-when": "^3.5.1",
"jest-when-xt": "^0.2.0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant