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

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

Build:
Build:
LAST BUILD BRANCH: 2.x
DEFAULT BRANCH: main
Ran 21 Dec 2018 04:05AM UTC
Files 1
Run time 0s
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

21 Dec 2018 04:01AM UTC coverage: 61.665%. Remained the same
NPM_SCRIPT=coverage

push

travis-ci

trentmwillis
Tests: Unbreak test:cli due to unknown 'qunit' command

Follows-up 362e2416669, which removed 'npm link' from the 'test:cli'
script command.

Initially, I thought the reason the child proceses can't find qunit
is due to our use of execa.shell instead of regular execa. Specifically,
execa.shell() spawns a process that starts with a new shell and no
inherited environment variables. execa() on the other hand inherits
environment variables like PATH by default, and it also has a
'preferLocal' option that ensures node_modules/.bin is in the PATH
even if you're running the tests without 'npm run ..' (e.g. if you'd
use 'bin/qunit test/cli/*.js' directly).

Switching to execa() is non-trivial because it requires an array
as input and there aren't built-in or trust-worthy modules that
parse a command string into an array. Trying it with brute-force
I realised the problem is actually that 'qunit' isn't visible
at all even in the original environment created by npm-run.

While npm-run does add node_modules/.bin, and bins from (dev)dependencies
are indeed linked from there, the bins from the current package itself
(qunit) are never linked in .bin.

So... keeping it simple and just string-replacing 'qunit' with
'bin/qunit', which also matches the way we invoke the cli from
other commands in package.json already.

866 of 1556 branches covered (55.66%)

1607 of 2606 relevant lines covered (61.67%)

172.17 hits per line

Source Files on job 2366.7 (NPM_SCRIPT=coverage)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 2306
  • Travis Job 2366.7
  • b385b83c on github
  • Prev Job for NPM_SCRIPT=coverage on master (#2358.7)
  • Next Job for NPM_SCRIPT=coverage on master (#2367.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