Skip to content

Commit 465323d

Browse files
committed
1 parent 0d65a72 commit 465323d

File tree

136 files changed

+2107
-1971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2107
-1971
lines changed

packages/admob/__tests__/admob.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { firebase, FirebaseAdMobTypes } from '../lib';
22

3-
describe('Admob', () => {
4-
describe('namespace', () => {
5-
it('accessible from firebase.app()', () => {
3+
describe('Admob', function() {
4+
describe('namespace', function() {
5+
it('accessible from firebase.app()', function() {
66
const app = firebase.app();
77
expect(app.admob).toBeDefined();
88
expect(app.admob().app).toEqual(app);
99
});
1010
});
1111

12-
describe('setRequestConfiguration()', () => {
13-
it('throws if config is not an object', () => {
12+
describe('setRequestConfiguration()', function() {
13+
it('throws if config is not an object', function() {
1414
// @ts-ignore
1515
expect(() => firebase.admob().setRequestConfiguration('123')).toThrowError(
1616
"firebase.admob().setRequestConfiguration(*) 'requestConfiguration' expected an object value",
1717
);
1818
});
1919

20-
describe('maxAdContentRating', () => {
21-
it('throws if maxAdContentRating is invalid', () => {
20+
describe('maxAdContentRating', function() {
21+
it('throws if maxAdContentRating is invalid', function() {
2222
expect(() =>
2323
firebase.admob().setRequestConfiguration({
2424
maxAdContentRating: 'Y' as FirebaseAdMobTypes.MaxAdContentRating[keyof FirebaseAdMobTypes.MaxAdContentRating],
@@ -29,8 +29,8 @@ describe('Admob', () => {
2929
});
3030
});
3131

32-
describe('tagForChildDirectedTreatment', () => {
33-
it('throws if tagForChildDirectedTreatment not a boolean', () => {
32+
describe('tagForChildDirectedTreatment', function() {
33+
it('throws if tagForChildDirectedTreatment not a boolean', function() {
3434
expect(() =>
3535
firebase.admob().setRequestConfiguration({
3636
// @ts-ignore
@@ -42,8 +42,8 @@ describe('Admob', () => {
4242
});
4343
});
4444

45-
describe('tagForUnderAgeOfConsent', () => {
46-
it('throws if tagForUnderAgeOfConsent not a boolean', () => {
45+
describe('tagForUnderAgeOfConsent', function() {
46+
it('throws if tagForUnderAgeOfConsent not a boolean', function() {
4747
expect(() =>
4848
firebase.admob().setRequestConfiguration({
4949
// @ts-ignore

packages/admob/__tests__/consent.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { AdsConsent } from '../lib';
22

3-
describe('Admob AdsConsent', () => {
4-
describe('requestInfoUpdate', () => {
5-
it('throws if publisherIds is not an array', () => {
3+
describe('Admob AdsConsent', function() {
4+
describe('requestInfoUpdate', function() {
5+
it('throws if publisherIds is not an array', function() {
66
// @ts-ignore
77
expect(() => AdsConsent.requestInfoUpdate('pub-123')).toThrowError(
88
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds' expected an array of string values.",
99
);
1010
});
1111

12-
it('throws if publisherIds is empty array', () => {
12+
it('throws if publisherIds is empty array', function() {
1313
expect(() => AdsConsent.requestInfoUpdate([])).toThrowError(
1414
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds' list of publisher IDs cannot be empty.",
1515
);
1616
});
1717

18-
it('throws if publisherIds contains non-string values', () => {
18+
it('throws if publisherIds contains non-string values', function() {
1919
// @ts-ignore
2020
expect(() => AdsConsent.requestInfoUpdate(['foo', 123])).toThrowError(
2121
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds[1]' expected a string value.",

packages/admob/__tests__/interstitial.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import { InterstitialAd } from '../lib';
22

3-
describe('Admob Interstitial', () => {
4-
describe('createForAdRequest', () => {
5-
it('throws if adUnitId is invalid', () => {
3+
describe('Admob Interstitial', function() {
4+
describe('createForAdRequest', function() {
5+
it('throws if adUnitId is invalid', function() {
66
// @ts-ignore
77
expect(() => InterstitialAd.createForAdRequest(123)).toThrowError(
88
"'adUnitId' expected an string value",
99
);
1010
});
1111

12-
it('throws if requestOptions are invalid', () => {
12+
it('throws if requestOptions are invalid', function() {
1313
// @ts-ignore
1414
expect(() => InterstitialAd.createForAdRequest('123', 123)).toThrowError(
1515
"firebase.admob() InterstitialAd.createForAdRequest(_, *) 'options' expected an object value.",
1616
);
1717
});
1818

1919
// has own tests
20-
it('returns a new instance', () => {
20+
it('returns a new instance', function() {
2121
const i = InterstitialAd.createForAdRequest('abc');
2222
expect(i.constructor.name).toEqual('InterstitialAd');
2323
expect(i.adUnitId).toEqual('abc');
2424
expect(i.loaded).toEqual(false);
2525
});
2626

27-
describe('show', () => {
28-
it('throws if showing before loaded', () => {
27+
describe('show', function() {
28+
it('throws if showing before loaded', function() {
2929
const i = InterstitialAd.createForAdRequest('abc');
3030

3131
expect(() => i.show()).toThrowError(
@@ -34,15 +34,15 @@ describe('Admob Interstitial', () => {
3434
});
3535
});
3636

37-
describe('onAdEvent', () => {
38-
it('throws if handler is not a function', () => {
37+
describe('onAdEvent', function() {
38+
it('throws if handler is not a function', function() {
3939
const i = InterstitialAd.createForAdRequest('abc');
4040

4141
// @ts-ignore
4242
expect(() => i.onAdEvent('foo')).toThrowError("'handler' expected a function");
4343
});
4444

45-
it('returns an unsubscriber function', () => {
45+
it('returns an unsubscriber function', function() {
4646
const i = InterstitialAd.createForAdRequest('abc');
4747
const unsub = i.onAdEvent(() => {});
4848
expect(unsub).toBeDefined();

packages/admob/e2e/admob.e2e.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
*
1616
*/
1717

18-
describe('admob()', () => {
19-
describe('namespace', () => {
20-
it('accessible from firebase.app()', () => {
18+
describe('admob()', function() {
19+
describe('namespace', function() {
20+
it('accessible from firebase.app()', function() {
2121
const app = firebase.app();
2222
should.exist(app.admob);
2323
app.admob().app.should.equal(app);
2424
});
2525
});
2626

27-
describe('setRequestConfiguration()', () => {
28-
it('throws if config is not an object', () => {
27+
describe('setRequestConfiguration()', function() {
28+
it('throws if config is not an object', function() {
2929
try {
3030
firebase.admob().setRequestConfiguration('123');
3131
return Promise.reject(new Error('Did not throw Error.'));
@@ -35,8 +35,8 @@ describe('admob()', () => {
3535
}
3636
});
3737

38-
describe('maxAdContentRating', () => {
39-
it('throws if maxAdContentRating is invalid', () => {
38+
describe('maxAdContentRating', function() {
39+
it('throws if maxAdContentRating is invalid', function() {
4040
try {
4141
firebase.admob().setRequestConfiguration({
4242
maxAdContentRating: 'Y',
@@ -48,15 +48,15 @@ describe('admob()', () => {
4848
}
4949
});
5050

51-
it('accepts a age rating', async () => {
51+
it('accepts a age rating', async function() {
5252
await firebase.admob().setRequestConfiguration({
5353
maxAdContentRating: firebase.admob.MaxAdContentRating.G,
5454
});
5555
});
5656
});
5757

58-
describe('tagForChildDirectedTreatment', () => {
59-
it('throws if tagForChildDirectedTreatment not a boolean', () => {
58+
describe('tagForChildDirectedTreatment', function() {
59+
it('throws if tagForChildDirectedTreatment not a boolean', function() {
6060
try {
6161
firebase.admob().setRequestConfiguration({
6262
tagForChildDirectedTreatment: 'true',
@@ -70,15 +70,15 @@ describe('admob()', () => {
7070
}
7171
});
7272

73-
it('sets the value', async () => {
73+
it('sets the value', async function() {
7474
await firebase.admob().setRequestConfiguration({
7575
tagForChildDirectedTreatment: false,
7676
});
7777
});
7878
});
7979

80-
describe('tagForUnderAgeOfConsent', () => {
81-
it('throws if tagForUnderAgeOfConsent not a boolean', () => {
80+
describe('tagForUnderAgeOfConsent', function() {
81+
it('throws if tagForUnderAgeOfConsent not a boolean', function() {
8282
try {
8383
firebase.admob().setRequestConfiguration({
8484
tagForUnderAgeOfConsent: 'false',
@@ -92,7 +92,7 @@ describe('admob()', () => {
9292
}
9393
});
9494

95-
it('sets the value', async () => {
95+
it('sets the value', async function() {
9696
await firebase.admob().setRequestConfiguration({
9797
tagForUnderAgeOfConsent: false,
9898
});

0 commit comments

Comments
 (0)