Skip to content

Commit 9ac873c

Browse files
test(crashlytics): fix test to ignore deprecation warning
1 parent 87a6473 commit 9ac873c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/crashlytics/e2e/crashlytics.e2e.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,13 @@ describe('crashlytics()', function () {
9090
let logged = false;
9191
// eslint-disable-next-line no-console
9292
console.warn = msg => {
93-
msg.should.containEql('expects an instance of Error');
94-
logged = true;
95-
// eslint-disable-next-line no-console
96-
console.warn = orig;
93+
// we console.warn for deprecated API, can be removed when we move to v9
94+
if (!msg.includes('v8 method is deprecated')) {
95+
msg.should.containEql('expects an instance of Error');
96+
logged = true;
97+
// eslint-disable-next-line no-console
98+
console.warn = orig;
99+
}
97100
};
98101

99102
firebase.crashlytics().recordError(1337);

0 commit comments

Comments
 (0)