I am just starting out with Angular using https://github.com/mgechev/angular-seed as the initial setup.
I'm having trouble getting the initial unit test setup with Jasmine. The OAuth library used in my project seems to be a problem, but I'm not sure if it can be safely suppressed or what changes I need to make to the configuration. The main path / node_modules is currently incorrect, but I'm not sure which part of the configuration builds it. I tried to add the path to the ignored section, but the error persists. Any help appreciated.
'use strict';
var argv = require('yargs').argv;
var minimatch = require("minimatch");
module.exports = function (config) {
config.set({
basePath: './',
frameworks: ['jasmine'],
files: [
'node_modules/core-js/client/shim.min.js',
'node_modules/intl/dist/Intl.min.js',
'node_modules/traceur/bin/traceur.js',
'node_modules/systemjs/dist/system.src.js',
'node_modules/zone.js/dist/zone.js',
'node_modules/zone.js/dist/long-stack-trace-zone.js',
'node_modules/zone.js/dist/async-test.js',
'node_modules/zone.js/dist/fake-async-test.js',
'node_modules/zone.js/dist/sync-test.js',
'node_modules/zone.js/dist/proxy.js',
'node_modules/zone.js/dist/jasmine-patch.js',
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
{ pattern: 'node_modules/@angular/**/*.js', included: false, watched: true },
{ pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false },
{ pattern: 'dist/dev/**/*.js', included: false, watched: true },
{ pattern: 'dist/dev/**/*.html', included: false, watched: true, served: true },
{ pattern: 'dist/dev/**/*.css', included: false, watched: true, served: true },
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: false, watched: false },
{ pattern: 'dist/dev/assets/**/*', watched: false, included: false, served: true },
'test-config.js',
'dist/dev/app/system-config.js',
'test-main.js'
],
proxies: {
'/assets/': '/base/dist/dev/assets/'
},
exclude: [
'node_modules/**/*spec.js',
'node_modules/angular-oauth2-oidc/dist/index.js',
],
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [
'Chrome'
],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
singleRun: false,
client: {
files: argv.files ? minimatch.makeRe(argv.files).source : null
}
});
if (process.env.APPVEYOR) {
config.browsers = ['IE'];
config.singleRun = true;
config.browserNoActivityTimeout = 90000;
}
if (process.env.TRAVIS || process.env.CIRCLECI) {
config.browsers = ['Chrome_travis_ci'];
config.singleRun = true;
config.browserNoActivityTimeout = 90000;
}
};
The following is the error message:
06 07 2017 09:27:29.589:INFO [karma]: Karma v1.3.0 server started at http://loca
lhost:9876/
06 07 2017 09:27:29.590:INFO [launcher]: Launching browser Chrome with unlimited
concurrency
06 07 2017 09:27:29.595:INFO [launcher]: Starting browser Chrome
06 07 2017 09:27:31.064:INFO [Chrome 59.0.3071 (Windows 8.1 0.0.0)]: Connected o
n socket /#4mhCO5mVkEwzD0EfAAAA with id 14947625
06 07 2017 09:27:32.242:WARN [web-server]: 404: /base/node_modules/angular-oauth
2-oidc/dist/index.js
Chrome 59.0.3071 (Windows 8.1 0.0.0) ERROR: '(SystemJS) XHR error (404 Not Found
) loading http://localhost:9876/base/node_modules/angular-oauth2-oidc/dist/index
.js
Error: XHR error (404 Not Found) loading http://localhost:9876/base/node
_modules/angular-oauth2-oidc/dist/index.js
at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (ht
tp://localhost:9876/base/node_modules/zone.js/dist/zone.js?082dc1d83c7a42ddda9b6
52319d281eef1d450d5:1056:39)
at ZoneDelegate.invokeTask (http://localhost:9876/base/node_modules/
zone.js/dist/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:424:31)
at Zone.runTask (http://localhost:9876/base/node_modules/zone.js/dis
t/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:191:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:9876/base/node_m
odules/zone.js/dist/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:486:38)
Error loading http://localhost:9876/base/node_modules/angular-oauth2-oid
c/dist/index.js as "angular-oauth2-oidc" from http://localhost:9876/base/dist/de
v/app/shared/login/login-service.js'
Chrome 59.0.3071 (Windows 8.1 0.0.0) ERROR: '(SystemJS) XHR error (404 Not Found
) loading http://localhost:9876/base/node_modules/angular-oauth2-oidc/dist/index
.js
Error: XHR error (404 Not Found) loading http://localhost:9876/base/node
_modules/angular-oauth2-oidc/dist/index.js
at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (ht
tp://localhost:9876/base/node_modules/zone.js/dist/zone.js?082dc1d83c7a42ddda9b6
52319d281eef1d450d5:1056:39)
at ZoneDelegate.invokeTask (http://localhost:9876/base/node_modules/
zone.js/dist/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:424:31)
at Zone.runTask (http://localhost:9876/base/node_modules/zone.js/dis
t/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:191:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:9876/base/node_m
odules/zone.js/dist/zone.js?082dc1d83c7a42ddda9b652319d281eef1d450d5:486:38)
Error loading http://localhost:9876/base/node_modules/angular-oauth2-oid
c/dist/index.js as "angular-oauth2-oidc" from http://localhost:9876/base/dist/de
v/app/shared/login/login-service.js'
06 07 2017 09:27:32.274:WARN [web-server]: 404: /base/node_modules/angular-oauth
2-oidc/dist/index.js
Update:
After deleting the list of excluded files:
