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

qunitjs / qunit / 10166511838
90%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2024 04:55PM UTC
Jobs 1
Files 38
Run time 1min
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

30 Jul 2024 04:53PM UTC coverage: 90.191% (+0.02%) from 90.176%
10166511838

push

github

web-flow
Core: Always define globalThis.QUnit 

== Background

In QUnit 2.x, we always set the QUnit global in browser contexts, but
outside browsers, we only set the global if CJS/AMD wasn't detected.
Then, in the QUnit CLI, we set the global anyway, and we expect other
test runners to do the same, since that's how most QUnit tests are
written, including for Node.js targets.

In practice, the QUnit global would only be missing in custom test
runners that 1) target Node.js, 2) require/import qunit.js directly,
and 3) don't export it as a global.

I'm aware many communities import 'qunit' directly in each test file
for improved type support. That's great, and avoids needing to rely
on globals. But, that's not a requirement I want to impose on everyone,
especially for simple no-build-step and browser-facing projects.

== Why

Improve portability between test runners.

Remove the last edge case where the QUnit global can be undefined.
Make it QUnit's responsiblity to define this reliably, as indeed it
almost always already does. Remove this as undocumented requirement
for specific test runners to patch up on their end.

In light of Karma deprecation, and emergence of more general purpose
TAP runners, I'd like to remove this as factor that might make/break
QUnit support in one of those.

Closes https://github.com/qunitjs/qunit/pull/1771.

3 of 3 new or added lines in 1 file covered. (100.0%)

1839 of 2039 relevant lines covered (90.19%)

3493.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10166511838.1 14 May 56549 10:18PM UTC 0
90.19
GitHub Action Run
Source Files on build 10166511838
Detailed source file information is not available for this build.
  • Back to Repo
  • 5bff13af on github
  • Prev Build on main (#10135034087)
  • Next Build on main (#10169399777)
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