Ran
|
Jobs
2
|
Files
3
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
github
Add PageLoader to run tests w/ JSDOM & the browser PageLoader, in test-helpers.js, enables running the same tests whether running in Node with JSDOM or running in a browser. It also provides PageLoader.closeAll() for easy afterEach() cleanup. Its JsdomPageLoader contains the previous loadFromFile() and importModules() logic from main.test.js. It's also redesigned to be much more consistent, as extensively documented in the comments. Now it's possible to run the tests using the Vitest browser runner via: pnpm test -- --browser.name=chrome (Or "firefox"; "safari" seems a bit broken at the moment.) --- However, it's not yet possible to run headless via: pnpm test -- --browser.name=chrome --browser.headless This is because this change adds @vitest/browser v0.34.6, the latest non beta version, which doesn't contain: - https://github.com/vitest-dev/vitest/pull/4364 That PR passes the options that enable headless mode through to the BrowserProvider implementations, thus closing: - https://github.com/vitest-dev/vitest/issues/3930 However, the change is only present from v1.0.0-beta.3: - https://github.com/vitest-dev/vitest/commit/5cdeb558c - https://github.com/vitest-dev/vitest/releases/tag/v1.0.0-beta.3 I'll try updating to v1.0.0-beta.4 (the latest at this time). If that works, I'll commit it.
2 of 2 branches covered (100.0%)
Branch coverage included in aggregate %.
17 of 17 relevant lines covered (100.0%)
1.53 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 6883387920.1 | 1 |
100.0 |
GitHub Action Run | |
2 | 6883387920.2 | 2 |
100.0 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|