@@ -134,11 +134,11 @@ describe('SourceMapManager', () => {
134
134
sinon . stub ( SDK . PageResourceLoader . PageResourceLoader . instance ( ) , 'loadResource' ) . resolves ( { content} ) ;
135
135
sourceMapManager . attachSourceMap ( client , sourceURL , sourceMappingURL ) ;
136
136
assert . strictEqual ( sourceMapWillAttach . callCount , 1 , 'SourceMapWillAttach events' ) ;
137
- assert . isTrue ( sourceMapWillAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
137
+ sinon . assert . calledWith ( sourceMapWillAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
138
138
const sourceMap = await sourceMapManager . sourceMapForClientPromise ( client ) ;
139
139
assert . strictEqual ( sourceMapAttached . callCount , 1 , 'SourceMapAttached events' ) ;
140
- assert . isTrue ( sourceMapAttached . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
141
- assert . isTrue ( sourceMapAttached . calledWith ( sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ) ;
140
+ sinon . assert . calledWith ( sourceMapAttached , sinon . match . hasNested ( 'data.client' , client ) ) ;
141
+ sinon . assert . calledWith ( sourceMapAttached , sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ;
142
142
assert . isTrue ( sourceMapAttached . calledAfter ( sourceMapWillAttach ) ) ;
143
143
} ) ;
144
144
@@ -153,10 +153,10 @@ describe('SourceMapManager', () => {
153
153
sinon . stub ( SDK . PageResourceLoader . PageResourceLoader . instance ( ) , 'loadResource' ) . rejects ( 'Error' ) ;
154
154
sourceMapManager . attachSourceMap ( client , sourceURL , sourceMappingURL ) ;
155
155
assert . strictEqual ( sourceMapWillAttach . callCount , 1 , 'SourceMapWillAttach events' ) ;
156
- assert . isTrue ( sourceMapWillAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
156
+ sinon . assert . calledWith ( sourceMapWillAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
157
157
await sourceMapManager . sourceMapForClientPromise ( client ) ;
158
158
assert . strictEqual ( sourceMapFailedToAttach . callCount , 1 , 'SourceMapFailedToAttach events' ) ;
159
- assert . isTrue ( sourceMapFailedToAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
159
+ sinon . assert . calledWith ( sourceMapFailedToAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
160
160
assert . isTrue ( sourceMapFailedToAttach . calledAfter ( sourceMapWillAttach ) ) ;
161
161
} ) ;
162
162
@@ -171,11 +171,11 @@ describe('SourceMapManager', () => {
171
171
sinon . stub ( SDK . PageResourceLoader . PageResourceLoader . instance ( ) , 'loadResource' ) . resolves ( { content} ) ;
172
172
sourceMapManager . attachSourceMap ( client , sourceURL , sourceMappingURL ) ;
173
173
sourceMapManager . detachSourceMap ( client ) ;
174
- assert . isTrue ( sourceMapFailedToAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
174
+ sinon . assert . calledWith ( sourceMapFailedToAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
175
175
sourceMapManager . attachSourceMap ( client , sourceURL , sourceMappingURL ) ;
176
176
await sourceMapManager . sourceMapForClientPromise ( client ) ;
177
177
assert . strictEqual ( sourceMapAttached . callCount , 1 , 'SourceMapAttached events' ) ;
178
- assert . isTrue ( sourceMapAttached . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
178
+ sinon . assert . calledWith ( sourceMapAttached , sinon . match . hasNested ( 'data.client' , client ) ) ;
179
179
assert . isTrue ( sourceMapAttached . calledAfter ( sourceMapFailedToAttach ) ) ;
180
180
} ) ;
181
181
@@ -223,7 +223,7 @@ describe('SourceMapManager', () => {
223
223
assert . strictEqual ( loadResource . callCount , 0 , 'loadResource calls' ) ;
224
224
await sourceMapManager . sourceMapForClientPromise ( client ) ;
225
225
assert . strictEqual ( sourceMapFailedToAttach . callCount , 1 , 'SourceMapFailedToAttach events' ) ;
226
- assert . isTrue ( sourceMapFailedToAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
226
+ sinon . assert . calledWith ( sourceMapFailedToAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
227
227
} ) ;
228
228
} ) ;
229
229
@@ -246,8 +246,8 @@ describe('SourceMapManager', () => {
246
246
const sourceMap = await sourceMapManager . sourceMapForClientPromise ( client ) ;
247
247
sourceMapManager . detachSourceMap ( client ) ;
248
248
assert . strictEqual ( sourceMapDetached . callCount , 1 , 'SourceMapDetached events' ) ;
249
- assert . isTrue ( sourceMapDetached . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
250
- assert . isTrue ( sourceMapDetached . calledWith ( sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ) ;
249
+ sinon . assert . calledWith ( sourceMapDetached , sinon . match . hasNested ( 'data.client' , client ) ) ;
250
+ sinon . assert . calledWith ( sourceMapDetached , sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ;
251
251
} ) ;
252
252
253
253
it ( 'triggers the correct lifecycle events when disabled' , async ( ) => {
@@ -281,7 +281,7 @@ describe('SourceMapManager', () => {
281
281
sourceMapManager . setEnabled ( false ) ;
282
282
283
283
assert . strictEqual ( sourceMapFailedToAttach . callCount , 1 , 'SourceMapFailedToAttach events' ) ;
284
- assert . isTrue ( sourceMapFailedToAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
284
+ sinon . assert . calledWith ( sourceMapFailedToAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
285
285
} ) ;
286
286
287
287
it ( 'triggers the correct lifecycle events when disabling once attached' , async ( ) => {
@@ -297,8 +297,8 @@ describe('SourceMapManager', () => {
297
297
sourceMapManager . setEnabled ( false ) ;
298
298
299
299
assert . strictEqual ( sourceMapDetached . callCount , 1 , 'SourceMapDetached events' ) ;
300
- assert . isTrue ( sourceMapDetached . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
301
- assert . isTrue ( sourceMapDetached . calledWith ( sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ) ;
300
+ sinon . assert . calledWith ( sourceMapDetached , sinon . match . hasNested ( 'data.client' , client ) ) ;
301
+ sinon . assert . calledWith ( sourceMapDetached , sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ;
302
302
} ) ;
303
303
304
304
it ( 'triggers the correct lifecycle events when re-enabling' , async ( ) => {
@@ -324,11 +324,11 @@ describe('SourceMapManager', () => {
324
324
assert . strictEqual ( sourceMapDetached . callCount , 0 , 'SourceMapDetached events' ) ;
325
325
assert . strictEqual ( sourceMapFailedToAttach . callCount , 0 , 'SourceMapFailedToAttach events' ) ;
326
326
assert . strictEqual ( sourceMapWillAttach . callCount , 1 , 'SourceMapWillAttach events' ) ;
327
- assert . isTrue ( sourceMapWillAttach . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
327
+ sinon . assert . calledWith ( sourceMapWillAttach , sinon . match . hasNested ( 'data.client' , client ) ) ;
328
328
assert . isTrue ( sourceMapAttached . calledAfter ( sourceMapWillAttach ) ) ;
329
329
assert . strictEqual ( sourceMapAttached . callCount , 1 , 'SourceMapAttached events' ) ;
330
- assert . isTrue ( sourceMapAttached . calledWith ( sinon . match . hasNested ( 'data.client' , client ) ) ) ;
331
- assert . isTrue ( sourceMapAttached . calledWith ( sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ) ;
330
+ sinon . assert . calledWith ( sourceMapAttached , sinon . match . hasNested ( 'data.client' , client ) ) ;
331
+ sinon . assert . calledWith ( sourceMapAttached , sinon . match . hasNested ( 'data.sourceMap' , sourceMap ) ) ;
332
332
} ) ;
333
333
} ) ;
334
334
} ) ;
0 commit comments