Skip to content

Commit 936591c

Browse files
authored
Fix e2e tests (#6238)
1 parent 63caee2 commit 936591c

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

e2e/karma.conf.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ module.exports = function (config) {
5858
directories: ['./node_modules'],
5959
alias: {
6060
'@firebase/messaging/sw':
61-
'node_modules/@firebase/messaging/dist/index.sw.esm2017.js'
61+
'node_modules/@firebase/messaging/dist/index.sw.esm2017.js',
62+
'idb': 'node_modules/idb/build/index.js'
6263
}
6364
},
6465
transforms: [
@@ -77,7 +78,14 @@ module.exports = function (config) {
7778
]
7879
},
7980
compilerOptions: {
80-
allowJs: true
81+
allowJs: true,
82+
'module': 'commonjs',
83+
'moduleResolution': 'node',
84+
'resolveJsonModule': true,
85+
'esModuleInterop': true,
86+
'sourceMap': true,
87+
'target': 'es5',
88+
'importHelpers': true
8189
}
8290
},
8391
plugins: [

e2e/sample-apps/modular.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ import {
2323
logEvent
2424
} from 'firebase/analytics';
2525
import { initializeAppCheck, CustomProvider } from 'firebase/app-check';
26-
import { getFunctions, httpsCallable } from 'firebase/functions';
26+
import {
27+
getFunctions,
28+
httpsCallable,
29+
httpsCallableFromURL
30+
} from 'firebase/functions';
2731
import {
2832
getStorage,
2933
ref,
@@ -133,7 +137,7 @@ async function callFunctions(app) {
133137
throw e;
134138
}
135139
}
136-
callTest = httpsCallableByUrl(
140+
callTest = httpsCallableFromURL(
137141
functions,
138142
`https://us-central-${app.options.projectId}.cloudfunctions.net/callTest`
139143
);

e2e/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = [
5757
},
5858
devtool: 'source-map',
5959
devServer: {
60-
contentBase: './build'
60+
static: './build'
6161
}
6262
},
6363
{
@@ -96,7 +96,7 @@ module.exports = [
9696
},
9797
devtool: 'source-map',
9898
devServer: {
99-
contentBase: './build'
99+
static: './build'
100100
}
101101
}
102102
];

0 commit comments

Comments
 (0)