Skip to content

Commit

Permalink
tests(admob): add type override to intentionally-wrong syntax
Browse files Browse the repository at this point in the history
Incorrect type is now caught by TS
  • Loading branch information
davidgovea committed Sep 25, 2020
1 parent 19b7db1 commit 0ec9750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/admob/__tests__/admob.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { firebase } from '../lib';
import { firebase, FirebaseAdMobTypes } from '../lib';

describe('Admob', () => {
describe('namespace', () => {
Expand All @@ -21,7 +21,7 @@ describe('Admob', () => {
it('throws if maxAdContentRating is invalid', () => {
expect(() =>
firebase.admob().setRequestConfiguration({
maxAdContentRating: 'Y',
maxAdContentRating: 'Y' as FirebaseAdMobTypes.MaxAdContentRating[keyof FirebaseAdMobTypes.MaxAdContentRating],
}),
).toThrowError(
"firebase.admob().setRequestConfiguration(*) 'requestConfiguration.maxAdContentRating' expected on of MaxAdContentRating.G, MaxAdContentRating.PG, MaxAdContentRating.T or MaxAdContentRating.MA",
Expand Down

0 comments on commit 0ec9750

Please sign in to comment.