[MM-50011] Disable popping the dialog box for uncaught exceptions (#2519)
This commit is contained in:
parent
59c98036ee
commit
cf6611cc87
|
@ -60,7 +60,7 @@ async function toggleDarkMode() {
|
|||
robot.keyTap('enter');
|
||||
robot.keyTap('v');
|
||||
robot.keyTap('t');
|
||||
await asyncSleep(500); // Add a sleep because sometimes the second 't' doesn't fire
|
||||
await asyncSleep(500); // Add a sleep because sometimes the second 't' doesn't fire
|
||||
robot.keyTap('t'); // Click on "Toggle Dark Mode" menu item
|
||||
robot.keyTap('enter');
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
"test:e2e:build": "webpack-cli --config webpack.config.test.js",
|
||||
"test:e2e:run": "electron-mocha -r @babel/register --reporter mochawesome dist/tests/e2e_bundle.js",
|
||||
"test:e2e:send-report": "node ./e2e/save_report.js",
|
||||
"test:unit": "jest",
|
||||
"test:unit-ci": "jest --runInBand",
|
||||
"test:unit": "cross-env NODE_ENV=jest jest",
|
||||
"test:unit-ci": "cross-env NODE_ENV=jest jest --runInBand",
|
||||
"test:coverage": "jest --coverage",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all package:windows package:windows-nsis package:mac package:mac-with-universal package:linux",
|
||||
"package:windows": "npm-run-all build-prod && electron-builder --win zip --x64 --ia32 --arm64 --publish=never",
|
||||
|
|
|
@ -68,6 +68,10 @@ export class CriticalErrorHandler {
|
|||
const report = createErrorReport(err);
|
||||
fs.writeFileSync(file, report.replace(new RegExp('\\n', 'g'), os.EOL));
|
||||
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (app.isReady()) {
|
||||
const buttons = [
|
||||
localizeMessage('main.CriticalErrorHandler.uncaughtException.button.showDetails', 'Show Details'),
|
||||
|
|
Loading…
Reference in a new issue