Skip to content

Commit

Permalink
test: restore coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn committed Sep 6, 2024
1 parent eed4472 commit 0b73ca3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions __tests__/banner.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import * as ReactNative from 'react-native';
import React from 'react';
import { render } from '@testing-library/react-native';
import { BannerAd, BannerAdSize } from '../src';

const MOCK_ID = 'MOCK_ID';

jest.doMock('react-native', () => {
return Object.setPrototypeOf(
{
...ReactNative,
Platform: {
OS: 'android',
select: () => {},
},
},
ReactNative,
);
});

describe('Google Mobile Ads Banner', function () {
it('throws if no unit ID was provided.', function () {
let errorMsg;
Expand Down

0 comments on commit 0b73ca3

Please sign in to comment.