1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 03:32:36 +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 = { const DEFAULT_BENCHMARK = {
setup(state) { return state }, setup(state) { return state },
teardown() {},
run(state) {} run(state) {}
} }
@@ -111,8 +112,7 @@ function runBenchmarks() {
}, },
onComplete() { onComplete() {
const teardown = global.getScope().benchmark.teardown global.getScope().benchmark.teardown()
if (teardown) teardown()
} }
})) }))
} }