要使用 Bun 测试运行器跳过测试,请使用 test.skip 函数。
ts
import { test } from "bun:test";
test.skip("未实现的功能", () => {
expect(Bun.isAwesome()).toBe(true);
});运行 bun test 将不会执行此测试。它将在终端输出中标记为已跳过。
sh
bun testtxt
test.test.ts:
✓ add [0.03ms]
✓ multiply [0.02ms]
» unimplemented feature
2 pass
1 skip
0 fail
2 expect() calls
Ran 3 tests across 1 files. [74.00ms]另请参阅: