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

qunitjs / qunit / 2791
89%
main: 90%

Build:
Build:
LAST BUILD BRANCH: 2.x
DEFAULT BRANCH: main
Ran 23 Aug 2020 04:56PM UTC
Jobs 1
Files 1
Run time 1s
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

pending completion
2791

push

travis-ci-com

Krinkle
CLI: Reduce startup by using tiny-glob to only scan relevant paths

This follows-up 837af390f6, which introduced the ignore list to
the `--watch` mode when `run.restart()` calls `findFiles()`.

This was a big improvement for watch mode, but it still left two
major issues behind:

1. It did not apply to when running qunit normally (without --watch).
   This could be easily fixed by passing IGNORED_GLOBS in run()
   down to getFilesFromArgs/findFiles the same way.

2. We are still scanning all other top-level directories that are
   not ignored, even if they do not match any part of the glob pattern.

I investigated numerous matching libraries (picomatch, minimatch, etc.)
but it seems none of of them offer a way to determine whether
a given directory could contain a matching file. E.g. something
that returns false for `src/` when given `test/*.js`, but returns
true for `src/` if given `**/*.js`.

So rather than approaching it from the angle of a matching library,
I went looking for various "proper" glob libraries instead which
handle both the pattern matching and the directory scanning
responsibilities together.

I considered:

* isaacs/node-glob <http://npm.broofa.com/?q=glob@7.1.6>.
  10 dependencies, including 3 for minimatch. Not an option.

* mrmlnc/fast-glob <http://npm.broofa.com/?q=fast-glob@3.2.4>
  This uses picomatch, which is promising as being a popular
  dependency-free alternative to minimatch.
  But, it unfortunately does add up to 16 dependencies in total.

* Crafity/node-glob <http://npm.broofa.com/?q=node-glob@1.2.0>
  A mostly self-contained implementation with 2 dependencies
  ('async' and 'glob-to-regexp'). Unfortunately, it seems to
  not do a limited traversal but rather

* terkelg/tiny-glob <http://npm.broofa.com/?q=tiny-glob@0.2.6>
  Another self-contained implementation, with two local
  dependencies by the same author. Claims to be much faster
  than both fast-glob and node-glob. I think we have a winner.

Ref https://github.... (continued)

901 of 1943 branches covered (46.37%)

1718 of 3136 relevant lines covered (54.78%)

150.92 hits per line

Jobs
ID Job ID Ran Files Coverage
6 2791.6 (NPM_SCRIPT=coverage) 23 Aug 2020 04:56PM UTC 0
54.78
Travis Job 2791.6
Source Files on build 2791
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #2791
  • b7fb112d on github
  • Prev Build on master (#2787)
  • Next Build on master (#2794)
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