m-radzikowski / aws-sdk-client-mock

AWS JavaScript SDK v3 mocks for easy unit testing. 🖋️ Typed 🔬 Tested 📄 Documented 🛠️ Maintained
https://m-radzikowski.github.io/aws-sdk-client-mock/
MIT License
811 stars 40 forks source link

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

Open manthinaa opened 3 days ago

manthinaa commented 3 days ago

Checklist

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

manthinaa commented 3 days ago

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" }