Skip to content

Commit 187a7fb

Browse files
authored
v0.2.0-alpha.3 (#26)
* feat(deps): update to firebase-tools-extra `v0.1.0-alpha.2` (improved fixture handling) * fix(core): preserve existing `FIREBASE_PROJECT_ID` in `cypress.env.json`
1 parent ea26419 commit 187a7fb

File tree

4 files changed

+58
-133
lines changed

4 files changed

+58
-133
lines changed

cmds/createTestEnvFile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ function createTestEnvFile(envName) {
5353

5454
// Get project from .firebaserc
5555
const firebaserc = readJsonFile(FIREBASE_CONFIG_FILE_PATH);
56+
57+
const currentCypressEnvSettings = readJsonFile(TEST_ENV_FILE_PATH);
58+
5659
const FIREBASE_PROJECT_ID =
60+
get(currentCypressEnvSettings, 'FIREBASE_PROJECT_ID') ||
5761
envVarBasedOnCIEnv(`${envPrefix}FIREBASE_PROJECT_ID`) ||
5862
get(
5963
firebaserc,
@@ -123,7 +127,6 @@ function createTestEnvFile(envName) {
123127
/* eslint-enable no-console */
124128
// Remove firebase app
125129
appFromSA.delete();
126-
const currentCypressEnvSettings = readJsonFile(TEST_ENV_FILE_PATH);
127130

128131
// Create config object to be written into test env file by combining with existing config
129132
const newCypressConfig = Object.assign({}, currentCypressEnvSettings, {

0 commit comments

Comments
 (0)