@@ -333,6 +333,34 @@ describe('Jasmine', function() {
333
333
expect ( this . loader . load ) . toHaveBeenCalledWith ( jasmine . any ( String ) , false ) ;
334
334
} ) ;
335
335
} ) ;
336
+
337
+ it ( 'logs a deprecation when a require has a path beginning with ../' , function ( ) {
338
+ this . configObject . requires = [ '../somefile.js' ] ;
339
+ spyOn ( console , 'warn' ) ;
340
+
341
+ this . fixtureJasmine . loadConfig ( this . configObject ) ;
342
+ expect ( ( ) => this . fixtureJasmine . loadRequires ( ) )
343
+ . toThrowError ( / ^ C a n n o t f i n d m o d u l e ' \. \. \/ s o m e f i l e .j s ' / ) ;
344
+
345
+ expect ( console . warn ) . toHaveBeenCalledWith ( 'DEPRECATION: requires ' +
346
+ 'with relative paths (in this case ../somefile.js) are currently ' +
347
+ 'resolved relative to the jasmine/lib/jasmine module but will be ' +
348
+ 'relative to the current working directory in Jasmine 4.0.' ) ;
349
+ } ) ;
350
+
351
+ it ( 'logs a deprecation when a require has a path beginning with ./' , function ( ) {
352
+ this . configObject . requires = [ './somefile.js' ] ;
353
+ spyOn ( console , 'warn' ) ;
354
+
355
+ this . fixtureJasmine . loadConfig ( this . configObject ) ;
356
+ expect ( ( ) => this . fixtureJasmine . loadRequires ( ) )
357
+ . toThrowError ( / ^ C a n n o t f i n d m o d u l e ' \. \/ s o m e f i l e .j s ' / ) ;
358
+
359
+ expect ( console . warn ) . toHaveBeenCalledWith ( 'DEPRECATION: requires ' +
360
+ 'with relative paths (in this case ./somefile.js) are currently ' +
361
+ 'resolved relative to the jasmine/lib/jasmine module but will be ' +
362
+ 'relative to the current working directory in Jasmine 4.0.' ) ;
363
+ } ) ;
336
364
} ) ;
337
365
338
366
describe ( 'from a file' , function ( ) {
0 commit comments