before(fn)
fn<Function> | <AsyncFunction> 钩子函数
注册一个钩子,在当前测试套件的基准测试开始前只运行一次。
🌐 Registers a hook that runs once before the benchmarks in the current suite.
fn <Function> | <AsyncFunction> 钩子函数注册一个钩子,在当前测试套件的基准测试开始前只运行一次。
🌐 Registers a hook that runs once before the benchmarks in the current suite.