Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e18d8da

Browse files
authoredDec 11, 2024··
More v19 enhancements (#3586)
* Pending tasks and data-connect * Migrating to pendingUntilEvent * Starting to refactor test suite * Bumping eslint * Disabiling compat/firestore tests for now
1 parent a58b329 commit e18d8da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+6940
-824
lines changed
 

‎firebase.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,21 @@
2828
"ui": {
2929
"enabled": false
3030
}
31-
}
31+
},
32+
"functions": [
33+
{
34+
"source": "test/functions",
35+
"codebase": "default",
36+
"ignore": [
37+
"node_modules",
38+
".git",
39+
"firebase-debug.log",
40+
"firebase-debug.*.log",
41+
"*.local"
42+
],
43+
"predeploy": [
44+
"npm --prefix \"$RESOURCE_DIR\" run build"
45+
]
46+
}
47+
]
3248
}

‎karma.conf.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ const dns = require('node:dns');
33
// The emulator suite fails in CI, only on Node 18.
44
// This apparently fixes it.
55
// https://github.com/firebase/firebase-tools/issues/5755#issuecomment-1535445383
6-
dns.setDefaultResultOrder('ipv4first')
6+
dns.setDefaultResultOrder('ipv4first');
7+
8+
let firestoreEmulatorPort, storageEmulatorPort, authEmulatorPort, databaseEmulatorPort, functionsEmulatorPort;
9+
if (process.env.FIRESTORE_EMULATOR_HOST &&
10+
process.env.STORAGE_EMULATOR_HOST &&
11+
process.env.FIREBASE_AUTH_EMULATOR_HOST &&
12+
process.env.FIREBASE_DATABASE_EMULATOR_HOST) {
13+
firestoreEmulatorPort = parseInt(process.env.FIRESTORE_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9098'
14+
storageEmulatorPort = parseInt(process.env.STORAGE_EMULATOR_HOST.split(":")[2], 10); // 'http://127.0.0.1:9199'
15+
authEmulatorPort = parseInt(process.env.FIREBASE_AUTH_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9098'
16+
databaseEmulatorPort = parseInt(process.env.FIREBASE_DATABASE_EMULATOR_HOST.split(":")[1], 10); // '127.0.0.1:9002'
17+
functionsEmulatorPort = 5001; // TODO figure out why this env variable isn't present
18+
} else {
19+
console.error("Missing emulator environments variables");
20+
process.exit(1);
21+
}
722

823
// Karma configuration file, see link for more information
924
// https://karma-runner.github.io/1.0/config/configuration-file.html
@@ -21,7 +36,14 @@ module.exports = function (config) {
2136
require('@angular-devkit/build-angular/plugins/karma')
2237
],
2338
client: {
24-
clearContext: false // leave Jasmine Spec Runner output visible in browser
39+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
40+
args: [
41+
["FIRESTORE_EMULATOR_PORT", firestoreEmulatorPort],
42+
["DATABASE_EMULATOR_PORT", databaseEmulatorPort],
43+
["STORAGE_EMULATOR_PORT", storageEmulatorPort],
44+
["AUTH_EMULATOR_PORT", authEmulatorPort],
45+
["FUNCTIONS_EMULATOR_PORT", functionsEmulatorPort],
46+
],
2547
},
2648
coverageIstanbulReporter: {
2749
dir: `${process.cwd()}/coverage`,

0 commit comments

Comments
 (0)
Please sign in to comment.