Skip to content

Commit

Permalink
Add tests to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui committed Jul 24, 2023
1 parent 098fe7a commit 16d9dc5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
17 changes: 0 additions & 17 deletions .kokoro/presubmit/node12/system-test-against-test-db.cfg

This file was deleted.

15 changes: 8 additions & 7 deletions dev/system-test/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ class DeferredPromise<T> {
}
}

console.log(
`Running system tests with environment variables:\n ${JSON.stringify(
process.env,
null,
2
)}`
);

if (process.env.NODE_ENV === 'DEBUG') {
setLogFunction(console.log);
console.log(
`Testing with environment variables:\n ${JSON.stringify(
process.env,
null,
2
)}`
);
}

function getTestRoot(settings: Settings = {}) {
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
"predocs": "npm run compile",
"docs": "jsdoc -c .jsdoc.js",
"system-test:rest": "FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 600000",
"system-test:named-db:rest": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 600000",
"system-test:grpc": "mocha build/system-test --timeout 600000",
"system-test:named-db:grpc": "FIRESTORE_NAMED_DATABASE=test-db mocha build/system-test --timeout 600000",
"system-test:emulator:rest": "FIRESTORE_EMULATOR_HOST=localhost:8080 FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 600000",
"system-test:named-db:emulator:rest": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 600000",
"system-test:emulator:grpc": "FIRESTORE_EMULATOR_HOST=localhost:8080 mocha build/system-test --timeout 600000",
"system-test": "npm run system-test:grpc && npm run system-test:rest",
"system-test:emulator": "npm run system-test:emulator:grpc && npm run system-test:emulator:rest",
"system-test:named-db:emulator:grpc": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 mocha build/system-test --timeout 600000",
"system-test": "npm run system-test:grpc && npm run system-test:rest && npm run system-test:named-db:grpc && npm run system-test:named-db:rest",
"system-test:emulator": "npm run system-test:emulator:grpc && npm run system-test:emulator:rest && npm run system-test:named-db:emulator:grpc && npm run system-test:named-db:emulator:rest",
"presystem-test": "npm run compile",
"samples-test": "npm link && cd samples/ && npm link ../ && npm test && cd ../",
"conformance": "mocha build/conformance",
Expand Down

0 comments on commit 16d9dc5

Please sign in to comment.