File tree Expand file tree Collapse file tree
test/cases/context/issue-1769 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ ContextModule.prototype.source = function() {
149149 "function webpackAsyncContext(req) {\n" ,
150150 "\tvar ids = map[req];" ,
151151 "\tif(!ids)\n" ,
152- "\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n" ,
152+ "\t\treturn Promise.reject( new Error(\"Cannot find module '\" + req + \"'.\") );\n" ,
153153 "\treturn " ,
154154 hasMultipleChunks ?
155155 "Promise.all(ids.slice(1).map(__webpack_require__.e))" :
Original file line number Diff line number Diff line change 1+ it ( "should be able the catch a incorrect System.import" , function ( done ) {
2+ var expr = "1" ;
3+ System . import ( "./folder/" + expr ) . then ( function ( ) {
4+ done ( new Error ( "should not be called" ) ) ;
5+ } ) . catch ( function ( err ) {
6+ err . should . be . instanceof ( Error ) ;
7+ done ( ) ;
8+ } ) ;
9+ } ) ;
You can’t perform that action at this time.
0 commit comments