You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try and load up a module that has an incorrect path for an import, the promiseChain inside the karma-jspm/src/adapter fails (as it should). However, in the catch statement, on line 63, the call to karma.error is made, trying to error out a message. However, karma.error does not exist on the karma object, causing all the testing to shut down instead of failing on just that test.
Example test:
importPackageFactoryfrom'factories/InboxPackage';describe('the test module',()=>{it('is running tests',()=>{expect(true).toBe(true);});});
Error:
system.src.js:1085 GET http://localhost:9876/factories/InboxPackage.js 404 (Not Found)fetchTextFromURL @ system.src.js:1085(anonymous function) @ system.src.js:1646init @ system-polyfills.src.js:446Promise @ system-polyfills.src.js:434(anonymous function) @ system.src.js:1645(anonymous function) @ system.src.js:2667(anonymous function) @ system.src.js:3239(anonymous function) @ system.src.js:3506(anonymous function) @ system.src.js:3888(anonymous function) @ system.src.js:4347(anonymous function) @ system.src.js:4599(anonymous function) @ system.src.js:337tryCatchReject @ system-polyfills.src.js:1252runContinuation1 @ system-polyfills.src.js:1211Fulfilled.when @ system-polyfills.src.js:999Pending.run @ system-polyfills.src.js:890Scheduler._drain @ system-polyfills.src.js:166Scheduler.drain @ system-polyfills.src.js:131run @ system-polyfills.src.js:337
system-polyfills.src.js:209 Potentially unhandled rejection [4] TypeError: karma.error is not a function
at http://localhost:9876/base/node_modules/karma-jspm/src/adapter.js:63:19
at tryCatchReject (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:1252:30)
at runContinuation1 (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:1211:4)
at Rejected.when (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:1032:4)
at Pending.run (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:890:13)
at Scheduler._drain (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:166:19)
at Scheduler.drain (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:131:9)
at MutationObserver.run (http://localhost:9876/base/wwwroot/jspm_packages/system-polyfills.src.js:337:4)(anonymous function) @ system-polyfills.src.js:209report @ system-polyfills.src.js:236flush @ system-polyfills.src.js:258
Code that is failing:
//adapter.js: line 50// Load everything specified in loadFiles in the specified ordervarpromiseChain=Promise.resolve();for(vari=0;i<karma.config.jspm.expandedFiles.length;i++){promiseChain=promiseChain.then((function(moduleName){returnfunction(){returnSystem['import'](moduleName);};})(extractModuleName(karma.config.jspm.expandedFiles[i])));}promiseChain.then(function(){karma.start();},function(e){karma.error(e.name+": "+e.message);// <--- This is the line that is causing the error.});
The text was updated successfully, but these errors were encountered:
When I try and load up a module that has an incorrect path for an
import
, thepromiseChain
inside thekarma-jspm/src/adapter
fails (as it should). However, in the catch statement, on line 63, the call tokarma.error
is made, trying to error out a message. However,karma.error
does not exist on thekarma
object, causing all the testing to shut down instead of failing on just that test.Example test:
Error:
Code that is failing:
The text was updated successfully, but these errors were encountered: