Fix failing tests due to failed error logging

Unit and integration tests have been failing due to failed logging of
`Error` objects. These were creating an issue where `mocha` was not
properly returning right exit codes, leading to test pipelines
incorrectly passing despite test failures.

- Fix runtime behavior of failing to retrieve error stacks.
- Add tests for error handling.
- Add more robust custom error handling.

Related issues: babel/babel#14273, vuejs/vue-cli#6994.
This commit is contained in:
undergroundwires
2023-08-10 19:49:08 +02:00
parent 061afad967
commit 986ba078a6
5 changed files with 232 additions and 12 deletions

View File

@@ -24,6 +24,9 @@ module.exports = defineConfig({
},
// Fix compilation failing on macOS when running unit/integration tests
externals: ['fsevents'],
// Use something other than default source mapper or babel cannot
// log stacks like `console.log(new Error().stack)`
devtool: 'eval-source-map',
},
pluginOptions: {
// https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/guide.html#native-modules