File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ describe('Invalid syntax', function () {
22 'use strict' ;
33
44 describe ( 'in main file' , function ( ) {
5- it ( 'should throw an error for an invalid file path' , function ( ) {
6- return $RefParser
7- . dereference ( 'this file does not exist' )
8- . then ( helper . shouldNotGetCalled )
9- . catch ( function ( err ) {
10- expect ( err ) . to . be . an . instanceOf ( Error ) ;
11- if ( host . node ) {
12- expect ( err . code ) . to . equal ( 'ENOENT' ) ;
13- expect ( err . message ) . to . contain ( 'Error opening file ' ) ;
14- }
15- } ) ;
16- } ) ;
5+ // Safari and IE crash when running this test via Karma + SauceLabs
6+ if ( ! ( host . karma && host . env . SAUCE && ( host . browser . IE || host . browser . safari ) ) ) {
7+ it ( 'should throw an error for an invalid file path' , function ( ) {
8+ return $RefParser
9+ . dereference ( 'this file does not exist' )
10+ . then ( helper . shouldNotGetCalled )
11+ . catch ( function ( err ) {
12+ expect ( err ) . to . be . an . instanceOf ( Error ) ;
13+ if ( host . node ) {
14+ expect ( err . code ) . to . equal ( 'ENOENT' ) ;
15+ expect ( err . message ) . to . contain ( 'Error opening file ' ) ;
16+ }
17+ } ) ;
18+ } ) ;
19+ }
1720
1821 it ( 'should throw an error for an invalid YAML file' , function ( ) {
1922 return $RefParser
You can’t perform that action at this time.
0 commit comments