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