Tests use yarn not npm (#1038)
Currently, our underlying test script uses npm rather than yarn to execute the tests. This is awkward, because we use yarn everywhere else in lieu of npm. It turns out that some setups have node available without npm, and in such environments our tests fail with a cryptic ENOENT error. This changes the tests to use yarn instead. Test plan: `yarn test --full` passes. Thanks to @wpank for help uncovering this issue.
This commit is contained in:
parent
24895b3c7d
commit
5d3102e4db
|
@ -57,30 +57,22 @@ function makeTasks(mode /*: "BASIC" | "FULL" */) {
|
|||
},
|
||||
{
|
||||
id: "check-pretty",
|
||||
cmd: ["npm", "run", "--silent", "check-pretty"],
|
||||
cmd: ["yarn", "run", "--silent", "check-pretty"],
|
||||
deps: [],
|
||||
},
|
||||
{
|
||||
id: "lint",
|
||||
cmd: ["npm", "run", "--silent", "lint"],
|
||||
cmd: ["yarn", "run", "--silent", "lint"],
|
||||
deps: [],
|
||||
},
|
||||
{
|
||||
id: "flow",
|
||||
cmd: [
|
||||
"npm",
|
||||
"run",
|
||||
"--silent",
|
||||
"flow",
|
||||
"--",
|
||||
"--quiet",
|
||||
"--max-warnings=0",
|
||||
],
|
||||
cmd: ["yarn", "run", "--silent", "flow", "--quiet", "--max-warnings=0"],
|
||||
deps: [],
|
||||
},
|
||||
{
|
||||
id: "unit",
|
||||
cmd: ["npm", "run", "--silent", "unit", "--", "--ci", "--maxWorkers=4"],
|
||||
cmd: ["yarn", "run", "--silent", "unit", "--ci", "--maxWorkers=4"],
|
||||
deps: [],
|
||||
},
|
||||
{
|
||||
|
@ -91,11 +83,10 @@ function makeTasks(mode /*: "BASIC" | "FULL" */) {
|
|||
{
|
||||
id: "backend",
|
||||
cmd: [
|
||||
"npm",
|
||||
"yarn",
|
||||
"run",
|
||||
"--silent",
|
||||
"backend",
|
||||
"--",
|
||||
"--output-path",
|
||||
backendOutput,
|
||||
],
|
||||
|
@ -104,7 +95,7 @@ function makeTasks(mode /*: "BASIC" | "FULL" */) {
|
|||
{
|
||||
id: {BASIC: "sharness", FULL: "sharness-full"}[mode],
|
||||
cmd: withSourcecredBinEnv([
|
||||
"npm",
|
||||
"yarn",
|
||||
"run",
|
||||
"--silent",
|
||||
{BASIC: "sharness", FULL: "sharness-full"}[mode],
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
"unit": "BABEL_ENV=test NODE_ENV=test jest --env=jsdom",
|
||||
"sharness": "make -sC ./sharness prove PROVE_OPTS=-f TEST_OPTS='--chain-lint'",
|
||||
"sharness-full": "make -sC ./sharness prove PROVE_OPTS=-vf TEST_OPTS='-v --chain-lint --long'",
|
||||
"coverage": "npm run unit -- --coverage",
|
||||
"coverage": "yarn run unit --coverage",
|
||||
"flow": "flow",
|
||||
"lint": "eslint src config --max-warnings 0"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue