Skip to content

Separate workflow for lint and test #3662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint All Packages

on: push

jobs:
test:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Node (10)
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: yarn install
run: yarn
- name: yarn lint
run: yarn lint
2 changes: 1 addition & 1 deletion integration/browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"pretest": "mkdirp dist && browserify src/namespace.test.js -o dist/namespace.test.js",
"test": "karma start --single-run",
"test:ci": "node ../../scripts/run_tests_in_ci.js"
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.2.1",
"scripts": {
"test": "tsc",
"test:ci": "node ../../scripts/run_tests_in_ci.js"
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build:persistence": "INCLUDE_FIRESTORE_PERSISTENCE=true gulp compile-tests",
"build:memory": "INCLUDE_FIRESTORE_PERSISTENCE=false gulp compile-tests",
"test": "yarn build:memory; karma start --single-run; yarn build:persistence; karma start --single-run;",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
"test:persistence": " yarn build:persistence; karma start --single-run",
"test:persistence:debug:": "yarn build:persistence; karma start --auto-watch --browsers Chrome",
"test:memory": "yarn build:memory; karma start --single-run",
Expand Down
2 changes: 1 addition & 1 deletion integration/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.2.1",
"scripts": {
"test": "karma start --single-run",
"test:ci": "node ../../scripts/run_tests_in_ci.js"
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion integration/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"pretest": "webpack",
"test": "karma start --single-run",
"test:ci": "node ../../scripts/run_tests_in_ci.js"
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "7.18.0",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"release": "ts-node-script scripts/release/cli.ts",
"pretest": "node tools/pretest.js",
"test": "lerna run --concurrency 4 --stream test",
"test:ci": "lerna run --concurrency 4 --stream test:ci",
"test:release": "lerna run --concurrency 4 --ignore @firebase/*-exp --ignore firebase-exp --stream test:ci",
"test:exp": "lerna run --concurrency 4 --stream --scope @firebase/*-exp --scope firebase-exp test",
"test:ci": "lerna run --concurrency 4 test:ci",
"test:release": "lerna run --concurrency 4 --ignore @firebase/*-exp --ignore firebase-exp test:ci",
"test:exp": "lerna run --concurrency 4 --scope @firebase/*-exp --scope firebase-exp --stream test",
"pretest:coverage": "mkdirp coverage",
"ci:coverage": "lcov-result-merger 'packages/**/lcov.info' 'lcov-all.info'",
"test:coverage": "lcov-result-merger 'packages/**/lcov.info' | coveralls",
Expand Down
6 changes: 3 additions & 3 deletions packages-exp/app-exp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"build:release": "rollup -c rollup.config.release.js && yarn api-report && yarn typings:public",
"build:deps": "lerna run --scope @firebase/app-exp --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
"type-check": "tsc -p . --noEmit",
"prepare": "rollup -c rollup.config.release.js && yarn api-report",
"api-report": "api-extractor run --local --verbose",
"predoc": "node ../../scripts/exp/remove-exp.js temp",
Expand Down
6 changes: 3 additions & 3 deletions packages-exp/functions-exp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"build:deps": "lerna run --scope @firebase/functions-exp --include-dependencies build",
"build:release": "rollup -c rollup.config.release.js && yarn api-report",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
Expand Down
5 changes: 2 additions & 3 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,analytics}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && yarn run-p lint test:browser",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:browser",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
"test:browser": "karma start --single-run --nocache",
"type-check": "tsc -p . --noEmit",
"prepare": "yarn build"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/app --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit",
"test": "run-p lint test:all",
"test:all": "run-p test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/component --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit",
"test": "run-p lint test:all",
"test:all": "run-p test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
"prepare": "yarn build"
Expand Down
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build:deps": "lerna run --scope @firebase/'{app,database}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p lint test:emulator",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
"test:all": "run-p lint test:browser test:node",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test:exp:browser": "karma start --single-run --exp",
"test:exp:browser:debug": "karma start --single-run --exp --auto-watch",
"test": "run-s lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:lite:browser test:exp:browser test:travis test:minified",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
Expand Down
6 changes: 3 additions & 3 deletions packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,functions}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
Expand Down
5 changes: 2 additions & 3 deletions packages/installations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,installations}' --include-dependencies build",
"test": "yarn type-check && yarn test:karma && yarn lint",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:karma",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:karma",
"test:karma": "karma start --single-run",
"test:debug": "karma start --browsers=Chrome --auto-watch",
"type-check": "tsc -p . --noEmit",
"serve": "yarn serve:build && yarn serve:host",
"serve:build": "rollup -c test-app/rollup.config.js",
"serve:host": "http-server -c-1 test-app",
Expand Down
5 changes: 3 additions & 2 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/logger --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
Expand Down
9 changes: 4 additions & 5 deletions packages/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,messaging}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p test:karma type-check lint ",
"test:integration": "run-p test:karma type-check lint && cd ../../integration/messaging && npm run-script test",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:karma",
"test:integration": "test:karma && cd ../../integration/messaging && npm run-script test",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:karma",
"test:karma": "karma start --single-run",
"test:debug": "karma start --browsers=Chrome --auto-watch",
"prepare": "yarn build",
"type-check": "tsc --noEmit"
"prepare": "yarn build"
},
"license": "Apache-2.0",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/performance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build:deps": "lerna run --scope @firebase/'{app,performance}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p lint test:browser",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
"test:browser": "karma start --single-run",
"test:debug": "karma start --browsers=Chrome --auto-watch",
"prepare": "yarn build",
Expand Down
2 changes: 1 addition & 1 deletion packages/remote-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build:deps": "lerna run --scope @firebase/'{app,remote-config}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p lint test:browser",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
"test:browser": "karma start --single-run",
"test:debug": "karma start --browsers=Chrome --auto-watch",
"prettier": "prettier --write '{src,test}/**/*.{js,ts}'",
Expand Down
2 changes: 1 addition & 1 deletion packages/rules-unit-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dev": "rollup -c -w",
"test:nyc": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
"test": "firebase --debug emulators:exec 'yarn test:nyc'",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
"prepare": "yarn build"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rxfire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dev": "rollup -c -w",
"prepare": "yarn build",
"test": "run-p lint test:browser",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers=Chrome --auto-watch"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:deps": "lerna run --scope @firebase/'{app,storage}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p test:browser lint",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
"test:browser:unit": "karma start --single-run --unit",
"test:browser:integration": "karma start --single-run --integration",
"test:browser": "karma start --single-run",
Expand Down
6 changes: 3 additions & 3 deletions packages/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/'{app,template}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js",
"type-check": "tsc -p . --noEmit",
"prepare": "yarn build"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "rollup -c -w",
"test:nyc": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --config ../../config/mocharc.node.js",
"test": "firebase --debug emulators:exec 'yarn test:nyc'",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
"prepare": "yarn build"
},
"license": "Apache-2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build": "rollup -c",
"build:deps": "lerna run --scope @firebase/util --include-dependencies build",
"dev": "rollup -c -w",
"test": "yarn type-check && run-p lint test:browser test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit",
"test": "run-p lint test:all",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p test:browser test:node",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
"prepare": "yarn build"
Expand Down
8 changes: 5 additions & 3 deletions repo-scripts/changelog-generator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ const changelogFunctions: ChangelogFunctions = {
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]'
);
}
if (dependenciesUpdated.length === 0) return '';
if (dependenciesUpdated.length === 0) {
return '';
}

const changesetLink = `- Updated dependencies [${(
await Promise.all(
changesets.map(async cs => {
if (cs.commit) {
let { links } = await getInfo({
const { links } = await getInfo({
repo: options.repo,
commit: cs.commit
});
Expand Down Expand Up @@ -65,7 +67,7 @@ const changelogFunctions: ChangelogFunctions = {
.map(l => l.trimRight());

if (changeset.commit) {
let { pull: pullNumber, links } = await getInfo({
const { pull: pullNumber, links } = await getInfo({
repo: options.repo,
commit: changeset.commit
});
Expand Down
5 changes: 2 additions & 3 deletions repo-scripts/changelog-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"build": "tsc",
"build:dev": "tsc -w",
"test": "yarn type-check",
"prepare": "yarn build",
"type-check": "tsc -p . --noEmit"
"test": "tsc -p . --noEmit",
"prepare": "yarn build"
},
"dependencies": {
"@changesets/types": "3.1.0",
Expand Down
8 changes: 4 additions & 4 deletions repo-scripts/size-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"scripts": {
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"pretest": "tsc -p test/test-inputs && rollup -c",
"test": "yarn type-check && TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000",
"test:ci": "node ../../scripts/run_tests_in_ci.js",
"type-check": "tsc -p . --noEmit"
"test": "run-p lint test:node",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:node",
"pretest:node": "tsc -p test/test-inputs && rollup -c",
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha **/*.test.ts --config ../../config/mocharc.node.js --timeout 60000"
},
"dependencies": {
"typescript": "3.9.7",
Expand Down
20 changes: 17 additions & 3 deletions scripts/run_tests_in_ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,33 @@
* limitations under the License.
*/

const { argv } = require('yargs');
const yargs = require('yargs');
const path = require('path');
const { spawn } = require('child-process-promise');

const argv = yargs.options({
d: {
type: 'string',
desc: 'current working directory',
default: '.'
},
s: {
type: 'string',
desc: 'the npm script to run',
default: 'test'
}
}).argv;

(async () => {
const myPath = argv._[0] || '.'; // default to the current directory
const myPath = argv.d;
const scriptName = argv.s;
const dir = path.resolve(myPath);
const { name } = require(`${dir}/package.json`);

let stdout = '';
let stderr = '';
try {
const testProcess = spawn('yarn', ['--cwd', dir, 'test']);
const testProcess = spawn('yarn', ['--cwd', dir, scriptName]);

testProcess.childProcess.stdout.on('data', data => {
stdout += data.toString();
Expand Down