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

mozilla / web-ext / 3934
100%

Build:
DEFAULT BRANCH: master
Ran 17 Apr 2018 11:12AM CUT
Jobs 1
Files 28
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

pending completion
3934

push

travis-ci

rpl
fix: Improve web-ext start-up time by lazy loading some modules (#1302)

* fix: Lazy-load command modules to speed up start-up

Simple commands like `web-ext --help` now require less than a second
instead of 4 seconds to complete.

* test: refactor failing test and improve coverage

A previous commit changed `src/cmd/index.js` to not directly export the
implementations, but to lazy-load those modules.
So the test that did a simple comparison started failing.

To fix this test and maintain test coverage, change the test to
temporarily intercept invocations of the original cmd module,
for every command that is exported in `src/cmd/index.js`.

* fix: Lazy-load runner modules to speed up "web-ext run"

Boosts start-up performance by about 400ms.
Benchmarked as follows:

1. Create extension directory (manifest.json)
2. Start web-ext:

        time path/to/web-ext/bin/web-ext run -f/dev/null >/dev/null

   (The first `/dev/null` is to not let Firefox affect the timings,
    the program will crash with EACCESS as soon as it tries to
    spawn `/dev/null` as a program).
3. Repeat 10 times and measure the real time.

* refactor: Move runner module loading from cmd/run.js to extension-runners/index.js

Also, remove the optional FirefoxDesktopExtensionRunner and
FirefoxAndroidExtensionRunner parameters from cmd/run, since these were
only used in tests.
Now tests/unit/test-cmd/test.run.js detects runner creations by
stubbing the actual implementations instead of injecting an object.

* refactor: move prepareRun test helper outside describe

612 of 675 branches covered (90.67%)

27 of 27 new or added lines in 4 files covered. (100.0%)

1250 of 1250 relevant lines covered (100.0%)

23.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3934.1 17 Apr 2018 11:12AM CUT 0
100.0
Travis Job 3934.1
Source Files on build 3934
  • List 0
  • Changed 7
  • Source Changed 5
  • Coverage Changed 6
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/LineBranch HitsBranch Misses
No data available in table
Showing 0 to 0 of 0 entries
  • Previous
  • Next
  • Back to Repo
  • Travis Build #3934
  • f9db35b3 on github
  • Prev Build on master (#3912)
  • Next Build on master (#3953)
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

© 2025 Coveralls, Inc