From 05b1129e376e64eab86805d735d44121b4acd38f Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 5 May 2022 16:57:43 -0700 Subject: [PATCH 1/2] Fix e2e tests --- e2e/karma.conf.js | 13 +++++++++++-- e2e/sample-apps/modular.js | 4 ++-- e2e/webpack.config.js | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/e2e/karma.conf.js b/e2e/karma.conf.js index cfab2e22903..3ba7a61e761 100644 --- a/e2e/karma.conf.js +++ b/e2e/karma.conf.js @@ -58,7 +58,9 @@ module.exports = function (config) { directories: ['./node_modules'], alias: { '@firebase/messaging/sw': - 'node_modules/@firebase/messaging/dist/index.sw.esm2017.js' + 'node_modules/@firebase/messaging/dist/index.sw.esm2017.js', + 'idb': + 'node_modules/idb/build/index.js' } }, transforms: [ @@ -77,7 +79,14 @@ module.exports = function (config) { ] }, compilerOptions: { - allowJs: true + allowJs: true, + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "sourceMap": true, + "target": "es5", + "importHelpers": true, } }, plugins: [ diff --git a/e2e/sample-apps/modular.js b/e2e/sample-apps/modular.js index 04c6d95af21..297a63b0762 100644 --- a/e2e/sample-apps/modular.js +++ b/e2e/sample-apps/modular.js @@ -23,7 +23,7 @@ import { logEvent } from 'firebase/analytics'; import { initializeAppCheck, CustomProvider } from 'firebase/app-check'; -import { getFunctions, httpsCallable } from 'firebase/functions'; +import { getFunctions, httpsCallable, httpsCallableFromURL } from 'firebase/functions'; import { getStorage, ref, @@ -133,7 +133,7 @@ async function callFunctions(app) { throw e; } } - callTest = httpsCallableByUrl( + callTest = httpsCallableFromURL( functions, `https://us-central-${app.options.projectId}.cloudfunctions.net/callTest` ); diff --git a/e2e/webpack.config.js b/e2e/webpack.config.js index f0ef1fa7d02..38e56dd041b 100644 --- a/e2e/webpack.config.js +++ b/e2e/webpack.config.js @@ -57,7 +57,7 @@ module.exports = [ }, devtool: 'source-map', devServer: { - contentBase: './build' + static: './build' } }, { @@ -96,7 +96,7 @@ module.exports = [ }, devtool: 'source-map', devServer: { - contentBase: './build' + static: './build' } } ]; From e393c96b8c396e55d405edf693317c5b41eb855c Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 6 May 2022 09:11:16 -0700 Subject: [PATCH 2/2] Formatting pass --- e2e/karma.conf.js | 17 ++++++++--------- e2e/sample-apps/modular.js | 6 +++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/e2e/karma.conf.js b/e2e/karma.conf.js index 3ba7a61e761..84a81e303bb 100644 --- a/e2e/karma.conf.js +++ b/e2e/karma.conf.js @@ -59,8 +59,7 @@ module.exports = function (config) { alias: { '@firebase/messaging/sw': 'node_modules/@firebase/messaging/dist/index.sw.esm2017.js', - 'idb': - 'node_modules/idb/build/index.js' + 'idb': 'node_modules/idb/build/index.js' } }, transforms: [ @@ -80,13 +79,13 @@ module.exports = function (config) { }, compilerOptions: { allowJs: true, - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "sourceMap": true, - "target": "es5", - "importHelpers": true, + 'module': 'commonjs', + 'moduleResolution': 'node', + 'resolveJsonModule': true, + 'esModuleInterop': true, + 'sourceMap': true, + 'target': 'es5', + 'importHelpers': true } }, plugins: [ diff --git a/e2e/sample-apps/modular.js b/e2e/sample-apps/modular.js index 297a63b0762..cf08ca53d9d 100644 --- a/e2e/sample-apps/modular.js +++ b/e2e/sample-apps/modular.js @@ -23,7 +23,11 @@ import { logEvent } from 'firebase/analytics'; import { initializeAppCheck, CustomProvider } from 'firebase/app-check'; -import { getFunctions, httpsCallable, httpsCallableFromURL } from 'firebase/functions'; +import { + getFunctions, + httpsCallable, + httpsCallableFromURL +} from 'firebase/functions'; import { getStorage, ref,