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

qunitjs / qunit / 3167 / 7
89%
main: 90%

Build:
Build:
LAST BUILD BRANCH: 2.x
DEFAULT BRANCH: main
Ran 10 Jan 2021 11:33PM UTC
Files 29
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

10 Jan 2021 11:31PM UTC coverage: 89.37% (-0.1%) from 89.467%
3167.7

push

travis-ci-com

Krinkle
Core: Repair support for SpiderMonkey runtime

Three issues came up when trying to use QUnit in an embedded mozjs context.

1. console.warn is undefined.

   This regressed in a recent release where we started to assume that if
   'console' is defined, that 'console.warn' is as well.
   This is not true in SpiderMonkey (checked mozjs 68).

2. setTimeout is undefined.

   QUnit has historically made sure not to rely on setTimeout, but this broke
   when es6-promise was added in gh-1307, which assumed presence of setTimeout.
   The funny part is, mozjs 68 actually has native Promise support, but the
   polyfill is written in a way (and built in a way, with Rollup) that
   unconditionally builds and imports the fallback, even when it decides not to
   use it. It seems Rollup does not support importing files in a way that
   only executes the imported files conditionally (it always hoists imported files
   and executes imports before any other code). So, to fix this, I'm switching
   the polyfil library to a lighter alternative, and patching it with a
   conditional check on the inside rather than on the outside, so that it
   can be unconditionally imported by Rollup, but still only conditionally
   build its setTimeout-based fallback.

3. QUnit is not exported.

   I believe we used to have an export to the global object if no module loader
   was detected, but this morphed over time and we now hardcode global exports
   specifically for DOM global (window) and Web Worker global (self), which
   means it no longer worked in SpiderMonkey.

   Our current structure of the internal export.js file, is to provide any
   and all exports we can detect, which is rather unusual in the JS ecosystem,
   but it would also be a breaking change to stop doing this, so I'll reserve
   that for QUnit 3. This patch introduces a realm-agnostic global export if
   and only if no other export methods were applied.

   I suggest that in QUnit 3 we restructure this to simply ... (continued)

1172 of 1430 branches covered (81.96%)

2085 of 2333 relevant lines covered (89.37%)

349.34 hits per line

Source Files on job 3167.7
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 2835
  • Travis Job 3167.7
  • 2671d3f6 on github
  • Prev Job for NPM_SCRIPT=coveralls on master (#3145.6)
  • Next Job for on master (#3169.7)
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