1
0
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:
Soreine
2016-11-07 17:14:09 +01:00
parent c644e8d220
commit 4792a5e508

View File

@@ -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()
}
}))
}