Skip to content

Commit

Permalink
Wrap in try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed May 7, 2024
1 parent 69517bf commit b80a813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/nodes-base/benchmark.env.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ class BenchmarkEnvironment extends NodeEnvironment {

async teardown() {
console.log('[benchmarking] env teardown');
await this.benchmark();
try {
await this.benchmark();
} catch (e) {
console.log('[benchmarking] Caught error at teardown', e);
}

await super.teardown();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "git+https://github.com/n8n-io/n8n.git"
},
"scripts": {
"benchmark": "jest --config benchmark.config.js --runInBand",
"benchmark": "jest --config benchmark.config.js",
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
Expand Down

0 comments on commit b80a813

Please sign in to comment.