Skip to content

Commit d4c6750

Browse files
committed
chore: use "test" terminology
1 parent 240906f commit d4c6750

8 files changed

Lines changed: 20 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,11 @@ jobs:
3939
- name: Lint
4040
run: pnpm lint
4141

42-
# The provider source relies on provider-internal Vitest exports that only
43-
# fully resolve when the package is installed alongside a matching Vitest.
44-
# The JS build is the contract; typecheck is informational. See CONTRIBUTING.md.
4542
- name: Typecheck
4643
run: pnpm typecheck
47-
continue-on-error: true
4844

4945
test-browser:
50-
name: Smoke (${{ matrix.os }})
46+
name: Test (${{ matrix.os }})
5147
strategy:
5248
fail-fast: false
5349
matrix:
@@ -77,5 +73,5 @@ jobs:
7773
- name: Build
7874
run: pnpm build
7975

80-
- name: Smoke tests (webdriverio)
81-
run: pnpm test:smoke
76+
- name: Test (webdriverio)
77+
run: pnpm test

.github/workflows/prepare-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
RELEASE_INPUT="${RELEASE_VERSION:-$RELEASE_TYPE}"
6969
PREPARE_BRANCH="prepare-$TARGET_BRANCH-$RELEASE_INPUT-$RUN_ID"
7070
git switch -c "$PREPARE_BRANCH"
71-
git config user.name "vitest-release-bot[bot]"
72-
git config user.email "292707936+vitest-release-bot[bot]@users.noreply.github.com"
71+
git config user.name "vitest-community-release-bot[bot]"
72+
git config user.email "297853836+vitest-community-release-bot[bot]@users.noreply.github.com"
7373
pnpm run release
7474
7575
- id: generate-token

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ jobs:
111111
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
112112
run: |
113113
TAG="v$VERSION"
114-
git config user.name "vitest-release-bot[bot]"
115-
git config user.email "292707936+vitest-release-bot[bot]@users.noreply.github.com"
114+
git config user.name "vitest-community-release-bot[bot]"
115+
git config user.email "297853836+vitest-community-release-bot[bot]@users.noreply.github.com"
116116
git tag "$TAG" "$GITHUB_SHA"
117117
git push "https://x-access-token:$GH_TOKEN@github.com/$GITHUB_REPOSITORY.git" "$TAG"
118118

CONTRIBUTING.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ This package implements the (currently experimental) browser-provider contract e
2121
A few couplings are intentional and accepted as compatibility risks rather than worked around:
2222

2323
- the provider augments `vitest/node` and `vitest/browser` via `declare module`;
24-
- it reads `project.vitest.state._data` and `config.teardownTimeout` to extend the WebDriver shutdown timeout;
25-
- the locator engine assigns `__INTERNAL._createLocator` from `vitest/internal/browser`.
24+
- the locator engine assigns `__INTERNAL._createLocator` from `vitest/internal/browser`. That export is stripped from the published type declarations, so the import carries a `@ts-expect-error`.
2625

27-
These resolve against whichever Vitest version the consumer installs. When upgrading the supported Vitest version, bump this package to match and re-run the smoke suite.
26+
These resolve against whichever Vitest version the consumer installs. When upgrading the supported Vitest version, bump this package to match and re-run the test suite.
2827

29-
### Types vs JS
28+
### Types
3029

31-
The provider source imports a handful of symbols (`page`, `server`, `utils`, `Locator`, `ScreenshotMatcherOptions`, …) from `vitest/browser`. Those are only re-exported by `vitest/browser` when a browser-provider context is installed alongside it, so a standalone `pnpm typecheck` will report unresolved members. **The JS build is the contract**`pnpm build` is the source of truth and CI treats `typecheck` as informational (`continue-on-error`). To get a fully green typecheck/test run, develop against a matching Vitest (see below).
30+
`vitest/browser` only re-exports the browser context types (`page`, `server`, `utils`, `Locator`, `ScreenshotMatcherOptions`, …) through an installed provider package. Because the provider under development is the repo root and not in `node_modules`, [`tsconfig.json`](./tsconfig.json) maps `@vitest/browser-webdriverio` and `@vitest/browser-webdriverio/context` back to the local source via `paths`, so `pnpm typecheck` resolves those symbols through this package's own context. The only remaining gap is the intentionally-untyped `__INTERNAL` import (see above). Note: if a future Vitest release adds `__INTERNAL` to the published types, the `@ts-expect-error` becomes an unused directive and must be dropped.
3231

3332
## Developing against an unreleased Vitest
3433

@@ -42,17 +41,17 @@ overrides:
4241
4342
Do not commit the override. It is only for local development before a matching beta is published.
4443
45-
## Smoke tests
44+
## Tests
4645
4746
The suite in [`test/`](./test) is deliberately small. It does not re-test Vitest browser-mode behavior (that is Vitest's responsibility); it proves the WebdriverIO provider implements the contract and that its commands/locators/CDP/screenshots work against a real driver.
4847

4948
```sh
5049
# requires a local Chrome + chromedriver
51-
pnpm test:smoke
50+
pnpm test
5251
5352
# pick a browser / run headed
54-
BROWSER=firefox pnpm test:smoke
55-
HEADLESS=false pnpm test:smoke
53+
BROWSER=firefox pnpm test
54+
HEADLESS=false pnpm test
5655
```
5756

5857
In CI the [`setup-webdriverio`](./.github/actions/setup-webdriverio) action installs Chrome/ChromeDriver (and optionally Firefox) and exports `CHROME_BIN` / `CHROMEDRIVER_PATH` / `FIREFOX_BIN`, which [`vitest.config.ts`](./vitest.config.ts) feeds to WebdriverIO so it does not auto-download a mismatched driver.
@@ -63,7 +62,5 @@ Releases mirror the Vitest pipeline:
6362

6463
1. Run the **Prepare Publish** workflow (`workflow_dispatch`). It bumps the version with `bumpp` and opens a `chore: release vX.Y.Z` PR.
6564
2. Merge the PR. The **Publish Package** workflow detects the release commit, builds, publishes to npm via trusted publishing, pushes the `vX.Y.Z` tag, and generates a GitHub release with `changelogithub`.
66-
67-
Versioning policy: keep the version inside the current Vitest beta range (`5.0.0-beta.x`) and move the `vitest` peer range to `^5` once Vitest 5 is stable.
68-
69-
> The release workflows still reference the `vitest-release-bot[bot]` identity and the `RELEASE_GITHUB_APP_*` / npm trusted-publishing secrets. Update the bot identity and configure the secrets/`Release` environment for this repository before the first release.
65+
3. Approve the Release workflow in GitHub Actions.
66+
4. Approve the staged package on npm.

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,9 @@ Then run Vitest in the browser mode:
4848
npx vitest --browser
4949
```
5050

51-
## Compatibility
52-
53-
This provider builds against the published `vitest` and `@vitest/browser` packages and tracks the same major version line. The `peerDependencies` range is kept deliberately tight because the browser-provider API is still marked experimental upstream. When upgrading Vitest, upgrade this package to the matching version.
54-
5551
## Contributing
5652

57-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for local development, the build setup, the smoke test suite, and the release process.
53+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for local development, the build setup, the test suite, and the release process.
5854

5955
## License
6056

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"lint": "eslint .",
5252
"lint:fix": "eslint . --fix",
5353
"test": "vitest run",
54-
"test:smoke": "vitest run",
5554
"release": "tsx scripts/release.ts",
5655
"publish-ci": "tsx scripts/publish-ci.ts"
5756
},

test/user-event.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ beforeEach(() => {
88
})
99

1010
// One assertion per WebDriverIO user-event command (src/commands/*). These are
11-
// the highest-value smoke targets: each maps a Vitest user-event to a specific
11+
// the highest-value targets: each maps a Vitest user-event to a specific
1212
// WebDriver Actions API call and is exactly what regresses on a wdio bump.
1313
describe('user events', () => {
1414
it('click / dblClick', async () => {

vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import process from 'node:process'
22
import { defineConfig } from 'vitest/config'
33
import { webdriverio } from './src/index'
44

5-
const browser = process.env.BROWSER || 'chrome'
5+
const browser = process.env.BROWSER as 'chrome' | 'firefox' | 'safari' || 'chrome'
66

77
// In CI the `setup-webdriverio` action exports explicit binary paths so
88
// WebDriverIO does not auto-download a mismatched driver. Locally these are

0 commit comments

Comments
 (0)