使用 Bun 测试运行器跳过测试
要在 Bun 测试运行器中跳过测试,请使用 test.skip 函数。
import { test, expect } from "bun:test";
test.skip("尚未实现的功能", () => {
expect(Bun.isAwesome()).toBe(true);
});
运行 bun test 不会执行此测试。终端输出会将其标记为已跳过。
terminal
bun test
Text
test.test.ts:
» unimplemented feature
0 pass
1 skip
0 fail
Ran 1 test across 1 file. [74.00ms]
另请参见: