Ash Rhazaly
01/24/2022, 1:53 PMRoss Coundon
01/24/2022, 2:06 PMthdxr
01/24/2022, 2:31 PMAsh Rhazaly
01/24/2022, 2:33 PM"jest": {
"collectCoverageFrom": [
"src/**/*.ts",
"test/**/*.ts",
"!**/node_modules/**"
],
"coverageReporters": [
"html",
"text",
"text-summary",
"cobertura"
],
"setupFilesAfterEnv": [
"./src/jest-test-setup.js"
],
"testMatch": [
"**/*.test.ts"
]
}
thdxr
01/24/2022, 2:33 PMAsh Rhazaly
01/24/2022, 2:33 PMjest.mock("./config", () => {
return {
...jest.requireActual("./config"),
log: jest.fn(),
};
});
jest.mock("./common", () => {
return {
...jest.requireActual("./common"),
};
});
thdxr
01/24/2022, 2:34 PMthdxr
01/24/2022, 2:36 PMthdxr
01/24/2022, 2:36 PMAsh Rhazaly
01/24/2022, 2:40 PMAsh Rhazaly
01/24/2022, 2:45 PMmodule.exports = {
collectCoverageFrom: ["src/**/*.ts", "test/**/*.ts", "!**/node_modules/**"],
coverageReporters: ["html", "text", "text-summary", "cobertura"],
setupFilesAfterEnv: ["./src/jest-test-setup.js"],
testMatch: ["**/*.*test.(ts|tsx|js)"],
transform: {
"\\.ts$": "esbuild-runner/jest",
},
};
thdxr
01/24/2022, 2:50 PMesbuild-runner
? I'm not too sure because if you're calling jest directly SST isn't involved in the processAsh Rhazaly
01/24/2022, 3:03 PMthdxr
01/24/2022, 3:05 PMthdxr
01/24/2022, 3:05 PMRoss Coundon
01/24/2022, 3:06 PMRoss Coundon
01/24/2022, 3:23 PMAsh Rhazaly
01/24/2022, 4:36 PMAsh Rhazaly
01/24/2022, 4:37 PMAsh Rhazaly
01/24/2022, 4:47 PM@middy/core
are causing it, rollback to the last stable version and it'll work fine ^3.0.0-alpha.5
was causing the errorsRoss Coundon
01/24/2022, 4:51 PMfile-type
dependency has a major version update that causes this. They moved to pure ESMthdxr
01/24/2022, 4:55 PMRoss Coundon
01/31/2022, 7:52 PM