要使用 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]另請參閱: