@willbooster/wb 22.6.1 → 22.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/dist/index.js +45 -45
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
wb <command>
|
|
13
13
|
|
|
14
14
|
Commands:
|
|
15
|
-
wb verify
|
|
15
|
+
wb verify [targets...] Verify project code
|
|
16
16
|
wb buildIfNeeded Build code if changes are detected
|
|
17
17
|
wb check-env Verify that every fnox-declared environment
|
|
18
18
|
variable and secret resolves for the current
|
|
@@ -99,7 +99,7 @@ Commands:
|
|
|
99
99
|
wb test [targets...] Test project. If you pass no arguments, it will
|
|
100
100
|
run all tests. Use '--' to stop wb option
|
|
101
101
|
parsing and forward the remaining flags to
|
|
102
|
-
Playwright. Example: wb test --
|
|
102
|
+
Playwright. Example: wb test --grep
|
|
103
103
|
'uploaded image asset'
|
|
104
104
|
wb test-on-ci Test project on CI with no options.
|
|
105
105
|
wb tree-kill <pid> [signal] Kill the given process and all descendants
|
|
@@ -126,6 +126,36 @@ Options:
|
|
|
126
126
|
--help Show help [boolean]
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## Running relevant tests
|
|
130
|
+
|
|
131
|
+
Run `bun run verify`, then select test files or directories and optionally filter
|
|
132
|
+
case names with a regular expression:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
bun wb test test/unit/example.test.ts --grep 'handles invalid input'
|
|
136
|
+
bun wb test test/e2e/example.spec.ts --grep 'uploads an image'
|
|
137
|
+
bun wb verify --full test/unit/example.test.ts --grep 'handles invalid input'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`--grep` applies to Bun, Vitest, and Playwright. With no paths, it filters both
|
|
141
|
+
unit and E2E tests, allowing suites with no matching cases to pass so later suites
|
|
142
|
+
can run. If no suite matches, the name-only run also passes. With explicit paths,
|
|
143
|
+
the runner decides the no-match outcome; Vitest can pass with every case skipped.
|
|
144
|
+
The command and verification summary show the filter and no-match policy. Read
|
|
145
|
+
the test output or verification log to confirm which cases ran.
|
|
146
|
+
|
|
147
|
+
Paths are relative to the package being tested; in a monorepo,
|
|
148
|
+
select the package with `-w packages/example`. Use paths under `test/unit/`,
|
|
149
|
+
`test/e2e/`, or `test/debug/` to select the corresponding suite.
|
|
150
|
+
|
|
151
|
+
`wb verify --full` retains all verification steps and filters only its tests.
|
|
152
|
+
`verify` requires `--full` when test paths or `--grep` are supplied, and rejects
|
|
153
|
+
arguments after `--`; pass selections before the separator.
|
|
154
|
+
Without filters, test execution is unchanged. Filtered E2E runs omit the
|
|
155
|
+
unfiltered `test/e2e-additional` script. Playwright-specific options still go
|
|
156
|
+
after `--` in `wb test`; supply the name filter only once, before `--`.
|
|
157
|
+
Use `--grep-invert` for inverse Playwright name filters across versions.
|
|
158
|
+
|
|
129
159
|
## Verification
|
|
130
160
|
|
|
131
161
|
`wb verify` and `wb verify --full` are intended for coding agents. The log path is printed at startup.
|