diff --git a/packages/rspack/jest.config.js b/packages/rspack/jest.config.js index d53d10ef1459..ea8eec2876ee 100644 --- a/packages/rspack/jest.config.js +++ b/packages/rspack/jest.config.js @@ -1,3 +1,10 @@ +process.on("uncaughtException", (err, origin) => { + console.error(err.message, err.stack, process.exitCode); +}); +process.on("unhandledRejection", (err, origin) => { + console.error(err.message, err.stack, process.exitCode); +}); + /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ const config = { testEnvironment: "../../scripts/test/patch-node-env.cjs", @@ -10,6 +17,8 @@ const config = { "/tests/WatchSuspend.test.js" ], testTimeout: process.env.CI ? 120000 : 30000, + testResultsProcessor: "./testProcessor.js", + verbose: true, cache: false, transform: { "^.+\\.tsx?$": [ diff --git a/packages/rspack/testProcessor.js b/packages/rspack/testProcessor.js new file mode 100644 index 000000000000..e99a37bb59d2 --- /dev/null +++ b/packages/rspack/testProcessor.js @@ -0,0 +1,4 @@ +module.exports = function (result) { + console.log(JSON.stringify(result, null, 2)); + return result; +};