若要自動在檔案變更時重新執行測試,請使用 --watch
旗標
bun test --watch
Bun 會監看測試檔案中匯入的任何檔案的變更,並在偵測到變更時重新執行測試。
它很快。
在一個包含多個以「url」開頭的檔案的大資料夾中執行「bun test --watch url」pic.twitter.com/aZV9BP4eFu
— Jarred Sumner (@jarredsumner) 2023 年 3 月 29 日
簡介
Bun 是什麼?
安裝
快速入門
TypeScript
範本
bun init
bun create
執行時間
bun run
File types
TypeScript
JSX
Environment variables
Bun APIs
Web APIs
Node.js compatibility
Single-file executable
Plugins
Watch mode
Module resolution
Auto-install
bunfig.toml
Debugger
架構 API即將推出
套件管理員
bun install
bun add
bun remove
bun update
bun link
bun pm
Global cache
Workspaces
Lifecycle scripts
Filter
Lockfile
Scopes and registries
Overrides and resolutions
打包器
Bun.build
載入器
外掛程式
巨集
相較於 esbuild
測試執行器
bun test
Writing tests
Watch mode
Lifecycle hooks
Mocks
Snapshots
Dates and times
DOM testing
Code coverage
套件執行器
bunx
API
HTTP server
WebSockets
Workers
Binary data
Streams
File I/O
import.meta
SQLite
FileSystemRouter
TCP sockets
TCP sockets
Globals
$ Shell
Child processes
Transpiler
Hashing
Console
FFI
HTMLRewriter
Testing
Utils
Node-API
Glob
Semver
專案
路線圖
效能基準
貢獻
建置 Windows
授權
搜尋文件...
/
簡介
Bun 是什麼?
安裝
快速入門
TypeScript
範本
bun init
bun create
執行時間
bun run
File types
TypeScript
JSX
Environment variables
Bun APIs
Web APIs
Node.js compatibility
Single-file executable
Plugins
Watch mode
Module resolution
Auto-install
bunfig.toml
Debugger
架構 API即將推出
套件管理員
bun install
bun add
bun remove
bun update
bun link
bun pm
Global cache
Workspaces
Lifecycle scripts
Filter
Lockfile
Scopes and registries
Overrides and resolutions
打包器
Bun.build
載入器
外掛
巨集
與 esbuild 比較
測試執行器
bun test
Writing tests
Watch mode
Lifecycle hooks
Mocks
Snapshots
Dates and times
DOM testing
Code coverage
套件執行器
bunx
API
HTTP server
WebSockets
Workers
Binary data
Streams
File I/O
import.meta
SQLite
FileSystemRouter
TCP sockets
TCP sockets
Globals
$ Shell
Child processes
Transpiler
Hashing
Console
FFI
HTMLRewriter
Testing
Utils
Node-API
Glob
Semver
專案
路線圖
基準測試
貢獻
建立 Windows
授權
若要自動在檔案變更時重新執行測試,請使用 --watch
旗標
bun test --watch
Bun 會監看測試檔案中匯入的任何檔案的變更,並在偵測到變更時重新執行測試。
它很快。
在一個包含多個以「url」開頭的檔案的大資料夾中執行「bun test --watch url」pic.twitter.com/aZV9BP4eFu
— Jarred Sumner (@jarredsumner) 2023 年 3 月 29 日