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

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

Build:
Build:
LAST BUILD BRANCH: 2.x
DEFAULT BRANCH: main
Ran 28 Dec 2018 10:04PM 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

28 Dec 2018 10:00PM UTC coverage: 61.665%. Remained the same
NPM_SCRIPT=coverage

push

travis-ci

Krinkle
CLI: Re-implement run.watch() with 'node-watch' instead of 'sane'

Similar to the previous commit, I considered a simple approach
of our own based on the built-in Node.js API.

The fs.watch() API is actually quite good in Node 6+ (certainly
much better than it used to be). But, there are two notable
issues that I think we should care about:

1. Its "recursive" feature is lacking on Linux (only stable
   on macOS and Windows).
2. Its ability to distinguish between create, update and remove
   events isn't very good.

This last point would be fairly easily to do on the consumer
side with a quick fs.stat() call. We could even omit it entirely
given we only use it for one word (a verb) in the CLI output.
But the first point (recursion) is slightly more involved than
I'd like to maintain locally.

All the reviewed packages essentially handle this the same way.
They create a non-recursive fs.watch() for each sub directory found
on the system, track them in an object. Then, start new ones as
needed when new directories are created, and stop old one when
directories are removed. That's about 100 lines of simple code.

Where they differ is:
* How many extra features they provide.
* How many simple functions for non-critical code are delegated
  to other packages.
* Whether they use native "recursive" when available (on macOS/Windows).
  privide in addition to that

I'm proposing we go with node-watch. This package is well-maintained,
tested with the latest Node versions, optimised for Node 6+, and
provides no additional features, and is dependency-free.

> sane@4.0.2 (current)
>   Dependencies: ⚠️
>     119 packages.
>     (concerning in terms of dicipline and security)
>   License: ✅
>     MIT.
>   Supported: ✅
>     2018 saw 25 commits, 8 contributors, 2 major releases.
>   Modern: *️⃣
>     Requires Node 6+, but not yet tested on Node 10.

> gaze@1.1.3
>   Dependencies: *️⃣
>     14 packages.
>     (okay, but could be better.)
>   License: ✅
>     MIT.
>   ... (continued)

866 of 1556 branches covered (55.66%)

1607 of 2606 relevant lines covered (61.67%)

173.44 hits per line

Source Files on job 2388.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 2323
  • Travis Job 2388.7
  • 94fa19f8 on github
  • Prev Job for NPM_SCRIPT=coverage on master (#2387.7)
  • Next Job for NPM_SCRIPT=coverage on master (#2391.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