Closed andreivirtosu closed 7 years ago
The issue was with karma configuration. So what's needed is: Add to karma.conf.js:
files: [
// angular2-cookie
{ pattern: 'node_modules/angular2-cookie/**/*.js', included: false, watched: false },
{ pattern: 'node_modules/angular2-cookie/**/*.js.map', included: false, watched: false }
]
Add to karma-test-shim.js:
System.config({
packages: {
'angular2-cookie': {
main: './core.js',
defaultExtension: 'js'
}
},
map: {
'angular2-cookie': 'npm:angular2-cookie'
}
});
Not sure what I'm doing wrong, but this test fails to compile with the angular2/systemjs/karma setup:
The error I get: 26 10 2016 11:35:57.473:WARN [web-server]: 404: /base/node_modules/angular2-cookie/services/cookies.service.js
The setup was based on angular2 quick-start project: https://github.com/angular/quickstart