@@ -24,6 +24,11 @@ describe('admob() RewardedAd', function () {
24
24
25
25
describe ( 'createForAdRequest' , function ( ) {
26
26
it ( 'throws if adUnitId is invalid' , function ( ) {
27
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
28
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
29
+ return ;
30
+ }
31
+
27
32
try {
28
33
RewardedAd . createForAdRequest ( 123 ) ;
29
34
return Promise . reject ( new Error ( 'Did not throw Error.' ) ) ;
@@ -35,6 +40,11 @@ describe('admob() RewardedAd', function () {
35
40
36
41
// has own tests
37
42
it ( 'throws if requestOptions are invalid' , function ( ) {
43
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
44
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
45
+ return ;
46
+ }
47
+
38
48
try {
39
49
RewardedAd . createForAdRequest ( '123' , 123 ) ;
40
50
return Promise . reject ( new Error ( 'Did not throw Error.' ) ) ;
@@ -44,13 +54,23 @@ describe('admob() RewardedAd', function () {
44
54
} ) ;
45
55
46
56
it ( 'returns a new instance' , function ( ) {
57
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
58
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
59
+ return ;
60
+ }
61
+
47
62
const i = RewardedAd . createForAdRequest ( 'abc' ) ;
48
63
i . constructor . name . should . eql ( 'RewardedAd' ) ;
49
64
i . adUnitId . should . eql ( 'abc' ) ;
50
65
i . loaded . should . eql ( false ) ;
51
66
} ) ;
52
67
53
68
it ( 'loads with requestOptions' , async function ( ) {
69
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
70
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
71
+ return ;
72
+ }
73
+
54
74
if ( device . getPlatform ( ) === 'ios' ) {
55
75
// Flaky on local iOS
56
76
return ;
@@ -81,6 +101,11 @@ describe('admob() RewardedAd', function () {
81
101
82
102
describe ( 'show' , function ( ) {
83
103
it ( 'throws if showing before loaded' , function ( ) {
104
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
105
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
106
+ return ;
107
+ }
108
+
84
109
const i = RewardedAd . createForAdRequest ( 'abc' ) ;
85
110
86
111
try {
@@ -97,6 +122,11 @@ describe('admob() RewardedAd', function () {
97
122
98
123
describe ( 'onAdEvent' , function ( ) {
99
124
it ( 'throws if handler is not a function' , function ( ) {
125
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
126
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
127
+ return ;
128
+ }
129
+
100
130
const i = RewardedAd . createForAdRequest ( 'abc' ) ;
101
131
102
132
try {
@@ -109,13 +139,23 @@ describe('admob() RewardedAd', function () {
109
139
} ) ;
110
140
111
141
it ( 'returns an unsubscriber function' , function ( ) {
142
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
143
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
144
+ return ;
145
+ }
146
+
112
147
const i = RewardedAd . createForAdRequest ( 'abc' ) ;
113
148
const unsub = i . onAdEvent ( ( ) => { } ) ;
114
149
unsub . should . be . Function ( ) ;
115
150
unsub ( ) ;
116
151
} ) ;
117
152
118
153
it ( 'unsubscribe should prevent events' , async function ( ) {
154
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
155
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
156
+ return ;
157
+ }
158
+
119
159
if ( device . getPlatform ( ) === 'ios' ) {
120
160
// Flaky on local iOS
121
161
return ;
@@ -130,6 +170,11 @@ describe('admob() RewardedAd', function () {
130
170
} ) ;
131
171
132
172
it ( 'loads with a valid ad unit id' , async function ( ) {
173
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
174
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
175
+ return ;
176
+ }
177
+
133
178
if ( device . getPlatform ( ) === 'ios' ) {
134
179
// Flaky on local iOS
135
180
return ;
@@ -153,6 +198,11 @@ describe('admob() RewardedAd', function () {
153
198
} ) ;
154
199
155
200
it ( 'errors with an invalid ad unit id' , async function ( ) {
201
+ // Ads on Android in CI load a webview and a bunch of other things so slowly the app ANRs.
202
+ if ( device . getPlatform ( ) === 'android' && global . isCI == true ) {
203
+ return ;
204
+ }
205
+
156
206
const spy = sinon . spy ( ) ;
157
207
158
208
const i = RewardedAd . createForAdRequest ( '123' ) ;
0 commit comments