@invertase/react-native-google-ads
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,3 +7,3 @@ import admob, { GoogleAdsTypes } from '../lib'; | ||
// @ts-ignore | ||
expect(() => admob.setRequestConfiguration('123')).toThrowError( | ||
expect(() => admob().setRequestConfiguration('123')).toThrowError( | ||
"setRequestConfiguration(*) 'requestConfiguration' expected an object value", | ||
@@ -16,3 +16,3 @@ ); | ||
expect(() => | ||
admob.setRequestConfiguration({ | ||
admob().setRequestConfiguration({ | ||
maxAdContentRating: | ||
@@ -30,3 +30,3 @@ 'Y' as GoogleAdsTypes.MaxAdContentRating[keyof GoogleAdsTypes.MaxAdContentRating], | ||
expect(() => | ||
admob.setRequestConfiguration({ | ||
admob().setRequestConfiguration({ | ||
// @ts-ignore | ||
@@ -44,3 +44,3 @@ tagForChildDirectedTreatment: 'true', | ||
expect(() => | ||
admob.setRequestConfiguration({ | ||
admob().setRequestConfiguration({ | ||
// @ts-ignore | ||
@@ -54,3 +54,16 @@ tagForUnderAgeOfConsent: 'false', | ||
}); | ||
describe('testDeviceIdentifiers', function () { | ||
it('throws if testDeviceIdentifiers not an array', function () { | ||
expect(() => | ||
admob().setRequestConfiguration({ | ||
// @ts-ignore | ||
testDeviceIdentifiers: 'EMULATOR', | ||
}), | ||
).toThrowError( | ||
"setRequestConfiguration(*) 'requestConfiguration.testDeviceIdentifiers' expected an array value", | ||
); | ||
}); | ||
}); | ||
}); | ||
}); |
@@ -40,3 +40,3 @@ /* | ||
const requestId = _interstitialRequest++; | ||
return new InterstitialAd('interstitial', googleAds, requestId, adUnitId, options); | ||
return new InterstitialAd('interstitial', googleAds(), requestId, adUnitId, options); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -40,3 +40,3 @@ /* | ||
const requestId = _rewardedRequest++; | ||
return new RewardedAd('rewarded', googleAds, requestId, adUnitId, options); | ||
return new RewardedAd('rewarded', googleAds(), requestId, adUnitId, options); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -1181,4 +1181,4 @@ /* | ||
declare const defaultExport: GoogleAdsTypes.Module & GoogleAdsTypes.Statics; | ||
declare const defaultExport: () => GoogleAdsTypes.Module & GoogleAdsTypes.Statics; | ||
export default defaultExport; |
@@ -78,3 +78,3 @@ /* | ||
export default new GoogleAdsModule('AppName', { | ||
const googleMobileAds = new GoogleAdsModule('AppName', { | ||
statics, | ||
@@ -87,2 +87,6 @@ version, | ||
export default () => { | ||
return googleMobileAds; | ||
}; | ||
export { default as AdsConsentDebugGeography } from './AdsConsentDebugGeography'; | ||
@@ -89,0 +93,0 @@ export { default as AdsConsentStatus } from './AdsConsentStatus'; |
@@ -18,3 +18,3 @@ /* | ||
import { hasOwnProperty, isBoolean, isObject } from '../lib/common'; | ||
import { hasOwnProperty, isArray, isBoolean, isObject } from '../lib/common'; | ||
import MaxAdContentRating from './MaxAdContentRating'; | ||
@@ -62,3 +62,11 @@ | ||
if (hasOwnProperty(requestConfiguration, 'testDeviceIdentifiers')) { | ||
if (!isArray(requestConfiguration.testDeviceIdentifiers)) { | ||
throw new Error("'requestConfiguration.testDeviceIdentifiers' expected an array value"); | ||
} | ||
out.testDeviceIdentifiers = requestConfiguration.testDeviceIdentifiers; | ||
} | ||
return out; | ||
} |
// generated by genversion | ||
module.exports = '2.0.0'; | ||
module.exports = '2.0.1'; |
{ | ||
"name": "@invertase/react-native-google-ads", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Invertase <oss@invertase.io> (http://invertase.io)", | ||
@@ -5,0 +5,0 @@ "description": "React Native Google Ads is an easy way to monetize mobile apps with targeted, in-app advertising.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
350640
3417