sourcecred/config
William Chargin 3dda4ab35c
test: invoke `yarn backend` only once (#784)
Summary:
Lots of tests need the output of `yarn backend`. Before this commit,
they tended to create it themselves. This was slow and wasteful, and
also could in principle have race conditions (though in practice usually
tended not to).

This commit updates tests to respect a `SOURCECRED_BIN` environment
variable indicating the path to an existing directory of backend
applications.

Closes #765.

Test Plan:
Running `yarn test --full` passes.

Prepending `echo run >>/tmp/log &&` to the `backend` script in
`package.json` and running `yarn test --full` results in a log file
containing only one line, indicating that the script really is run only
once.

wchargin-branch: deduplicate-backend
2018-09-05 12:47:54 -07:00
..
jest Add `GitState`, `Environment` to the `VersionInfo` (#692) 2018-08-16 13:38:13 -07:00
RemoveBuildDirectoryPlugin.js webpack: empty build dir instead of removing it (#768) 2018-09-04 21:44:09 -07:00
babel.js babel: transform ES6 modules to CommonJS (#766) 2018-09-04 21:47:36 -07:00
env.js Allow backend `process.env` to see the runtime env (#748) 2018-08-31 16:34:18 -07:00
paths.js Replace `oclif` with `cli` (#744) 2018-09-02 16:11:56 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js test: invoke `yarn backend` only once (#784) 2018-09-05 12:47:54 -07:00
webpack.config.backend.js backend: set Babel flags in Webpack config (#781) 2018-09-05 12:10:19 -07:00
webpack.config.web.js webpack: remove superfluous linting step (#775) 2018-09-05 11:25:59 -07:00