Skip to content

Commit a4ab0f6

Browse files
authored
Functions test fix (#1236)
* check the browser compatibility more reliably before running the test * [AUTOMATED]: Prettier Code Styling
1 parent 33871d4 commit a4ab0f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/functions/test/browser/callable.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { HttpsError, FunctionsErrorCode } from '@firebase/functions-types';
2121
import firebase from '@firebase/app';
2222
import '@firebase/messaging';
2323
import { Service } from '../../src/api/service';
24+
import { isSupported } from '@firebase/messaging';
2425

2526
export const TEST_PROJECT = require('../../../../config/project.json');
2627

@@ -68,7 +69,7 @@ describe('Firebase Functions > Call', () => {
6869
// TODO(klimt): Move this to the cross-platform tests and delete this file,
6970
// once instance id works there.
7071
it('instance id', async () => {
71-
if (!('serviceWorker' in navigator)) {
72+
if (!isSupported()) {
7273
// Current platform does not support messaging, skip test.
7374
return;
7475
}

0 commit comments

Comments
 (0)