File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ class FetchMock {
7171 isExclude ( url ) {
7272 for ( let i = 0 ; i < this . exclude . length ; i ++ ) {
7373 const excludeUrl = this . exclude [ i ] ;
74- return excludeUrl === url || ( excludeUrl instanceof RegExp && excludeUrl . exec ( url ) !== null ) ;
74+ if ( excludeUrl === url || ( excludeUrl instanceof RegExp && excludeUrl . exec ( url ) !== null ) ) {
75+ return true ;
76+ }
7577 }
7678 return false ;
7779 }
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import FetchMock, { Mock } from '../';
55const fetch = new FetchMock ( require ( '../__mocks__' ) , {
66 fetch : require ( 'isomorphic-fetch' ) ,
77 exclude : [
8- 'http://www.baidu.com' ,
98 / ^ f o o ( b a r ) ? $ / i,
9+ / h t t p : \/ \/ w w w .b a i d u .c o m / ,
1010 ] ,
1111} ) . fetch ;
1212describe ( 'test fetch mock' , ( ) => {
You can’t perform that action at this time.
0 commit comments