Skip to content

Commit 7250d25

Browse files
Add minified integration tests to Firestore (#2448)
1 parent 94cf316 commit 7250d25

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

integration/firestore/gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function copyTests() {
3434
* Therefore these tests and helpers cannot have any src/ dependencies.
3535
*/
3636
const testBase = resolve(__dirname, '../../packages/firestore/test');
37+
const firebaseSdk = resolve(__dirname, '../../packages/firebase/firebase.js');
3738
return gulp
3839
.src(
3940
[
@@ -57,7 +58,7 @@ function copyTests() {
5758
* differences, as well as different paths to a valid firebase_export
5859
*/
5960
/import\s+firebase\s+from\s+('|")[^\1]+firebase_export\1;?/,
60-
"import * as firebase from 'firebase';"
61+
`import * as firebase from '${firebaseSdk}';`
6162
)
6263
)
6364
.pipe(

integration/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.1",
44
"private": true,
55
"scripts": {
6-
"build": "gulp compile-tests",
6+
"build": "(cd ../../ ; yarn build) ; gulp compile-tests",
77
"pretest:manual": "yarn build",
88
"pretest:debug": "yarn build",
99
"test": "echo 'Automated tests temporarily disabled, run `yarn test:manual` to execute these tests'",

integration/firestore/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "../../config/tsconfig.base.json"
2+
"extends": "../../config/tsconfig.base.json",
3+
"compilerOptions": {
4+
"noImplicitAny": false
5+
}
36
}

packages/firestore/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1212
"prettier": "prettier --write 'src/**/*.js' 'test/**/*.js' 'src/**/*.ts' 'test/**/*.ts'",
1313
"test": "run-s lint test:all",
14-
"test:all": "run-p test:browser test:travis",
14+
"test:all": "run-p test:browser test:travis test:minified",
1515
"test:browser": "karma start --single-run",
1616
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
1717
"test:node": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --opts ../../config/mocha.node.opts",
1818
"test:node:prod": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --opts ../../config/mocha.node.opts",
1919
"test:node:persistence": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator USE_MOCK_PERSISTENCE=YES TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --require ts-node/register --require index.node.ts --require test/util/node_persistence.ts --opts ../../config/mocha.node.opts",
2020
"test:node:persistence:prod": "USE_MOCK_PERSISTENCE=YES TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --require ts-node/register --require index.node.ts --require test/util/node_persistence.ts --opts ../../config/mocha.node.opts",
2121
"test:travis": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/firestore-test-runner.ts",
22+
"test:minified": "(cd ../../integration/firestore ; yarn test:manual)",
2223
"prepare": "yarn build"
2324
},
2425
"main": "dist/index.node.cjs.js",

0 commit comments

Comments
 (0)