若要使用 Bun 測試執行器略過測試,請使用 test.skip
函數。
import { test } from "bun:test";
test.skip("unimplemented feature", () => {
expect(Bun.isAwesome()).toBe(true);
});
執行 bun test
時,不會執行此測試。它會在終端機輸出中標示為已略過。
bun test
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]
另請參閱