• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbland / tomcat-servlet-testing-example / 6896293411
100%

Build:
DEFAULT BRANCH: main
Ran 16 Nov 2023 08:46PM UTC
Jobs 2
Files 3
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Nov 2023 08:22PM UTC coverage: 100.0%. Remained the same
6896293411

push

github

mbland
Use Vitest v1.0.0-beta.4, run browser tests in CI

Per commit af2084baf, running headless
browser tests at this moment requires at least Vitest v1.0.0-beta.3.
Updating to the beta version seems fine to me so far.

I found a way to run the headless browser tests in CI without making a
mess of the package.json script by using alternative config files.

Updated vite.config.js to use defineConfig() to make type information
available in IntelliJ. Added the buildDir() function to vite.config.js
to help configure test.outputFile in vitest.config.ci-browser.js.

---

I played around with trying to collect coverage from running the tests
in the browser. I'll try to add it in a future commit, but the basic
issues are:

- @vitest/coverage-istanbul is required, because @vitest/coverage-v8
  doesn't work in the browser.

- The command to run coverage is then:
  pnpm test -- --browser --coverage.enabled --coverage.provider=istanbul

- It currently reports 0% coverage, because when the tests call
  window.open() (via PageLoader.load()), the modules are loaded in a
  separate process.

I confirmed this last point using a temporary test that imported the
main.js module directly after creating a <div id="app"> on
window.document, generating 100% coverage. Running the test using
Node.js and JSDOM doesn't have the same problem, because JSDOM doesn't
open a new process.

I've ideas on how to handle this and generate coverage from the
browser-run tests in an elegant way that I'll try soon. I'm not sure
that I'll absolutely enable this in CI, but we'll see after I try out
these ideas and think about it some more.

2 of 2 branches covered (100.0%)

Branch coverage included in aggregate %.

12 of 12 relevant lines covered (100.0%)

2.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6896293411.1 16 Nov 2023 08:46PM UTC 0
100.0
GitHub Action Run
2 6896293411.2 16 Nov 2023 08:46PM UTC 0
100.0
GitHub Action Run
Source Files on build 6896293411
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #6896293411
  • 98c3ce1b on github
  • Prev Build on main (#6883387920)
  • Next Build on main (#6899315782)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc