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:
@@ -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()
|
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user