Skip to content

Run test:exp and test:lite while emulator is running #3587

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 6 commits into from
Aug 10, 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
7 changes: 5 additions & 2 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@
"gendeps:exp": "../../scripts/exp/extract-deps.sh --types ./exp-types/index.d.ts --bundle ./dist/exp/tmp.js --output ./exp/dependencies.json",
"pregendeps:lite": "node scripts/build-bundle.js --input ./lite/index.ts --output ./dist/lite/tmp.js",
"gendeps:lite": "../../scripts/exp/extract-deps.sh --types ./lite-types/index.d.ts --bundle ./dist/lite/tmp.js --output ./lite/dependencies.json",
"test:lite": "node ./scripts/run-tests.js --emulator --platform node_lite --main=lite/index.ts 'lite/test/**/*.test.ts'",
"test:lite": "node ./scripts/run-tests.js --emulator --platform node_lite --main=lite/index.ts 'lite/test/**/*.test.ts'",
"test:lite:prod": "node ./scripts/run-tests.js --platform node_lite --main=lite/index.ts 'lite/test/**/*.test.ts'",
"test:lite:browser": "karma start --single-run --lite",
"test:lite:browser:debug": "karma start --single-run --lite --auto-watch",
"test:exp": "node ./scripts/run-tests.js --emulator --main=exp/index.ts test/integration/api/*.test.ts",
"test:exp:prod": "node ./scripts/run-tests.js --main=exp/index.ts test/integration/api/*.test.ts",
"test:exp:persistence": "node ./scripts/run-tests.js --emulator --persistence --main=exp/index.ts test/integration/api/*.test.ts",
"test:exp:persistence:prod": "node ./scripts/run-tests.js --persistence --main=exp/index.ts test/integration/api/*.test.ts",
"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:all": "run-p test:browser test:lite:browser test:exp:browser test:travis test:minified test:exp test:lite",
"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",
"test:node": "node ./scripts/run-tests.js --main=index.node.ts --emulator 'test/{,!(browser)/**/}*.test.ts'",
Expand Down
12 changes: 10 additions & 2 deletions scripts/emulator-testing/firestore-test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ function runTest(port: number, projectId: string, withPersistence: boolean) {
// ready in Firestore emulator.
// Use `prod` to allow test runner's env variable overrides to work.
if (withPersistence) {
return spawn('yarn', ['test:node:persistence:prod'], options);
return Promise.all([
spawn('yarn', ['test:node:persistence:prod'], options),
spawn('yarn', ['test:exp:persistence:prod'], options),
spawn('yarn', ['test:lite:prod'], options)
]);
} else {
return spawn('yarn', ['test:node:prod'], options);
return Promise.all([
spawn('yarn', ['test:node:prod'], options),
spawn('yarn', ['test:exp:prod'], options),
spawn('yarn', ['test:lite:prod'], options)
]);
}
}

Expand Down