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

pouchdb / pouchdb / 12295
100%

Build:
DEFAULT BRANCH: master
Ran 09 Jul 2021 03:31PM UTC
Jobs 1
Files 1
Run time 4min
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
12295

push

travis-ci-com

web-flow
(#8319) - Fix node build ordering

* Extract pouchdb-server setup code

Having this code inline in the if-statement that decides what do do
based on the $SERVER variable makes this section harder to follow, so
I've moved all the setup code into functions that are invoked where
needed.

* Fix the build order in `bin/run-test.sh`

We have been observing that when running `npm test`, the tests don't
seem to run the current version of the code. It's possible to make edits
to the code, and the first time you run the tests, your edits won't have
any effect. They only apply the second time you run the tests.

This seems to be because of the order things are done in
`bin/run-test.sh`. Depending on the value of `SERVER`, it might start a
server using this command:

    node ./tests/misc/pouchdb-express-router.js

This process will import `packages/node_modules/pouchdb`, which in turn
imports other packages, whose `main` file is usually `lib/index.js`.
This file is not source code but is generated by the build process.

After it's started the server, `bin/run-test.sh` then runs one of the
test suites, with `test-node` being the default because `CLIENT`
defaults to `node`. The npm `test-node` command runs the `build-node`
command, which is what triggers the build of all packages and updates
their `lib` directories.

Because this happens after the server is started, the server is then
running out-of-date code. We fix this by putting code in
`bin/run-test.sh` to run `npm run build-node` if it's not already been
run, before any command that needs the node.js packages up-to-date, and
removing the call to `build-node` from the `test-node` command. This
should be safe because the only place the `test-node` task is invoked is
in `bin/run-test.sh`.

2870 of 3110 branches covered (92.28%)

5893 of 5893 relevant lines covered (100.0%)

19641.06 hits per line

Jobs
ID Job ID Ran Files Coverage
27 12295.27 (NPM_CONFIG_PROGRESS="false" SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find COVERAGE=1 COMMAND=report-coverage) 09 Jul 2021 03:31PM UTC 0
100.0
Travis Job 12295.27
Source Files on build 12295
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #12295
  • 095ada4f on github
  • Prev Build on master (#12292)
  • Next Build on master (#12298)
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