Skip to content

Commit

Permalink
chore: init diagnose
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Sep 1, 2023
1 parent c66ba7a commit 7371d05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/rspack/jest.config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -10,6 +17,8 @@ const config = {
"<rootDir>/tests/WatchSuspend.test.js"
],
testTimeout: process.env.CI ? 120000 : 30000,
testResultsProcessor: "./testProcessor.js",
verbose: true,
cache: false,
transform: {
"^.+\\.tsx?$": [
Expand Down
4 changes: 4 additions & 0 deletions packages/rspack/testProcessor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = function (result) {
console.log(JSON.stringify(result, null, 2));
return result;
};

0 comments on commit 7371d05

Please sign in to comment.