Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-jasmine fails to test if module loader is SystemJS ??? #70

Closed
HeavenlyHost opened this issue Apr 23, 2016 · 2 comments
Closed

gulp-jasmine fails to test if module loader is SystemJS ??? #70

HeavenlyHost opened this issue Apr 23, 2016 · 2 comments

Comments

@HeavenlyHost
Copy link

So I may be new to this thing, but I am trying to use gulp to build, lint and test my demo solution. The app is using Angular 2, Gulp, SystemJS, gulp-tslint and gulp-jasmine, however I am unable to get the gulp-jasmine to run without falling over. It complains with the following

events.js:141
throw er; // Unhandled 'error' event
^
TypeError: Invalid System.register call. Anonymous System.register calls can on
ly be made by modules loaded by SystemJS.import and not via script tags.
at SystemJSNodeLoader. (D:\ng2demo\node_modules\systemjs\dist\sys
tem.src.js:2981:17)
at SystemJSNodeLoader. (D:\ng2demo\node_modules\systemjs\dist\sys
tem.src.js:3655:29)
at SystemJSNodeLoader. (D:\ng2demo\node_modules\systemjs\dist\sys
tem.src.js:4142:33)
at SystemJSNodeLoader.reduceRegister_ (D:\ng2demo\node_modules\systemjs\dist
\system.src.js:4142:33)
at SystemJSNodeLoader.pushRegister_ (D:\ng2demo\node_modules\systemjs\dist\s
ystem.src.js:2699:14)
at SystemJSNodeLoader.SystemJSLoader.register (D:\ng2demo\node_modules\syste
mjs\dist\system.src.js:2937:10)
at Object. (D:\ng2demo\app\assets\services\config.service.spec.js
:4:8)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)

The JS file it is attempting to run is a spec written in TypeScript and transpiled to JS with gulp-typescript. So the top line of the file is...

System.register(['angular2/core', 'angular2/http', 'angular2/http/testing', './config.service'], function(exports_1, context_1) {
//Do Stuff
});

It is this line it has a problem with, any ideas ???

@HeavenlyHost
Copy link
Author

Can anyone get back to me on this ?

@HeavenlyHost HeavenlyHost changed the title need help with systemjs gulp-jasmine will not run test if module loader is SystemJS ??? Apr 25, 2016
@HeavenlyHost HeavenlyHost changed the title gulp-jasmine will not run test if module loader is SystemJS ??? gulp-jasmine fails to test if module loader is SystemJS ??? Apr 25, 2016
@jbblanchet
Copy link
Contributor

Sorry, but this is not a workflow that I'm familiar with and I don't think it's something we are interested in supporting. If the problem wasn't with gulp-jasmine, and you find a solution, feel free to post it here. If the problem was with gulp-jasmine, and you're interested in submitting a pull request to solve it, I'd review it.

I'll close this issue for now, feel free to comment below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants