mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
Cleaner default benchmark teardown
This commit is contained in:
@@ -26,6 +26,7 @@ const { resolve } = require('path')
|
||||
|
||||
const DEFAULT_BENCHMARK = {
|
||||
setup(state) { return state },
|
||||
teardown() {},
|
||||
run(state) {}
|
||||
}
|
||||
|
||||
@@ -111,8 +112,7 @@ function runBenchmarks() {
|
||||
},
|
||||
|
||||
onComplete() {
|
||||
const teardown = global.getScope().benchmark.teardown
|
||||
if (teardown) teardown()
|
||||
global.getScope().benchmark.teardown()
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
Reference in New Issue
Block a user