WARN [web-server]: 404: /views/nav/offline.html - angularjs

Anyone knows how to solve/remove this very annoying WARNING?
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.23 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket rrNTMtmcd322dIl7A9fa with id 95590782
WARN [web-server]: 404: /views/nav/offline.html
WARN [web-server]: 404: /views/scan/scan.qr.html
karma.conf.js
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2014-08-26 using
// generator-karma 0.8.3
module.exports = function (config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-touch/angular-touch.js',
'bower_components/angular-ui-router/release/angular-ui-router.js',
'bower_components/angular-local-storage/angular-local-storage.js',
'bower_components/ionic/release/js/ionic.js',
'bower_components/ionic/release/js/ionic-angular.js',
'app/scripts/**/*.js',
'test/spec/**/*.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS'
],
// Which plugins to enable
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO
// Uncomment the following lines if you are using grunt's server to run the tests
// proxies: {
// '/': 'http://localhost:9000/'
// },
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});
};
app.js
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
// ACCOUNT
.state('account', {
abstract: true,
url: '/account',
templateUrl: 'index.html'
})
.state('account.main', {
url: '',
templateUrl: 'views/account/account.main.html'
})
.
.
.
// MENU
.state('menu', {
abstract: true,
url: '/menu',
templateUrl: 'views/nav/menu.html'
})
.state('menu.main', {
url: '/main',
views: {
'menuContent': {
templateUrl: 'views/dash/dash.main.html'
}
}
})
.
.
.
// OFFLINE MENU
.state('offline', {
abstract: true,
url: '/offline',
templateUrl: 'views/nav/offline.html'
})
.state('offline.product', {
url: '/product',
views: {
'menuContent': {
templateUrl: 'views/product/product.list.html'
}
}
})
.state('offline.qr', {
url: '/qr',
views: {
'menuContent': {
templateUrl: 'views/scan/scan.qr.html'
}
}
})
.state('offline.cart', {
url: '/cart',
views: {
'menuContent': {
templateUrl: 'views/cart/cart.list.html'
}
}
})
;
$urlRouterProvider.otherwise('/account');
})
I have also tried this related issue:
how to fix 404 warnings for images during karma unit testing
With no luck.
More Info
I have also tried the following:
1) Adding path to html:
'app/scripts/**/*.js',
'app/views/**/*.html',
'test/spec/**/*.js'
2) Create pattern:
'app/scripts/**/*.js',
'test/spec/**/*.js',
{pattern: 'app/views/**', watched: false, included: false, served: true}
3) Exclude the path to html files:
// list of files / patterns to exclude
exclude: ['app/views/**'],
But nothing works, the warning still exist. I'm assuming that this could be a bug?
Edit 1
I just did what Chad Robinson says, and the next warning is about missing index.html.
So what I did is this:
proxies: {
'/views/': '/app/views/',
'/index.html': '/app/index.html'
}
But there is still warning:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Grabhut.MobileApp\Grabhut>grunt
Running "newer:jshint" (newer) task
Running "newer:jshint:all" (newer) task
No newer files to process.
Running "newer:jshint:test" (newer) task
No newer files to process.
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "concurrent:test" (concurrent) task
Running "compass:dist" (compass) task
directory .tmp/styles
write .tmp/styles/icomoon.css (0.007s)
write .tmp/styles/override.css (0.055s)
Running "compass:server" (compass) task
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/icomoon.css created.
C:\Grabhut.MobileApp\Grabhut>grunt
Running "newer:jshint" (newer) task
Running "newer:jshint:all" (newer) task
No newer files to process.
Running "newer:jshint:test" (newer) task
No newer files to process.
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "concurrent:test" (concurrent) task
Running "compass:dist" (compass) task
directory .tmp/styles
write .tmp/styles/icomoon.css (0.007s)
write .tmp/styles/override.css (0.054s)
Running "compass:server" (compass) task
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/icomoon.css created.
File .tmp/styles/override.css created.
Running "connect:test" (connect) task
Started connect web server on http://localhost:9001
Running "karma:unit" (karma) task
C:\Grabhut.MobileApp\Grabhut\test\karma.conf.js:73
C:\Grabhut.MobileApp\Grabhut>grunt
Running "newer:jshint" (newer) task
Running "newer:jshint:all" (newer) task
No newer files to process.
Running "newer:jshint:test" (newer) task
No newer files to process.
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "concurrent:test" (concurrent) task
Running "compass:dist" (compass) task
directory .tmp/styles
write .tmp/styles/icomoon.css (0.007s)
write .tmp/styles/override.css (0.054s)
Running "compass:server" (compass) task
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/icomoon.css created.
C:\Grabhut.MobileApp\Grabhut>grunt
Running "newer:jshint" (newer) task
Running "newer:jshint:all" (newer) task
No newer files to process.
Running "newer:jshint:test" (newer) task
No newer files to process.
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "concurrent:test" (concurrent) task
Running "compass:dist" (compass) task
directory .tmp/styles
write .tmp/styles/icomoon.css (0.007s)
write .tmp/styles/override.css (0.055s)
Running "compass:server" (compass) task
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/icomoon.css created.
File .tmp/styles/override.css created.
Running "connect:test" (connect) task
Started connect web server on http://localhost:9001
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.23 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket PFqYQtg4gwm4psBKKJ5T with id 70053285
PhantomJS 1.9.7 (Windows 7): Executed 0 of 0 ERROR (0.001 secs / 0 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
Execution Time (2014-09-29 02:06:16 UTC)
concurrent:test 6.3s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 78%
autoprefixer:dist 97ms ■■ 1%
connect:test 433ms ■■■■■■■■■ 5%
karma:unit 1.2s ■■■■■■■■■■■■■■■■■■■■■■■ 15%
Total 8.1s
C:\Grabhut.MobileApp\Grabhut>
What's wrong with Karma?
Edit 2
Karma.conf.js
See karama config update at the bottom:
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2014-08-26 using
// generator-karma 0.8.3
module.exports = function (config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-touch/angular-touch.js',
'bower_components/angular-ui-router/release/angular-ui-router.js',
'bower_components/angular-local-storage/angular-local-storage.js',
'bower_components/ionic/release/js/ionic.js',
'bower_components/ionic/release/js/ionic-angular.js',
'app/scripts/**/*.js',
'test/spec/**/*.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS'
],
// Which plugins to enable
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
// Uncomment the following lines if you are using grunt's server to run the tests
proxies: {
'/views/': '/app/views/',
'/index.html': '/app/index.html'
}
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});
};

Based on your Karma config, it looks like you are running this from the root level of your project. But your application is in app/, and your templates are relative to that path... that is, you are accessing /views/nav/offline.html, not /app/views/nav/offline.html. Karma doesn't know what to do with this.
Try a proxy:
proxies = {
'/views/': '/app/views/'
};
This will tell Karma to treat /views/* requests as though they were for /app/views/*. Alternatively, you can move your configuration for Karma down a level, into app/ itself. Then change the include paths and other related items to the correct URLs and the problem will go away. (This is what I do.)

Related

Angular injector mod error in Karma

Getting the following error when I try and run karma and jasmine on a new project
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket RZqL_zkgcfP2w13UEtJj with id 40849718
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
Error: [$injector:nomod] http://errors.angularjs.org/1.5.5/$injector/nomod?p0=brainiacLms
at /Users/christianeckenrodework/Sites/brainiac/bower_components/angular/angular.min.js:25
This is my karma config
# // Karma configuration
# // Generated on Fri May 13 2016 16:53:01 GMT-0400 (EDT)
module.exports = (config) ->
config.set
basePath: './'
frameworks: [ 'jasmine' ]
files: [
'bower_components/angular/angular.min.js'
'bower_components/angular-mocks/angular-mocks.js'
'web/app.coffee'
'web/controllers/*.coffee'
'test/**/*.coffee'
]
exclude: []
preprocessors: {
'test/**/*.coffee': [ 'coffee' ]
'web/**/*.coffee': [ 'coffee' ]
}
reporters: [ 'progress' ]
port: 9876
colors: true
logLevel: config.LOG_INFO
autoWatch: true
browsers: [ 'PhantomJS' ]
singleRun: false
concurrency: Infinity
As far as I can tell the issue seems to be that it cant find my app module?
Found the answer: the reason my test threw the injector error is because I wasn't including all of my applications dependencies in my karma.conf.js file
I think you'll need to update your configuration file and use a files array like this:
files: [
// bower:js
'bower_components/angular/angular.min.js'
'bower_components/angular-mocks/angular-mocks.js'
// more bower dependences here...
// endbower
'web/app.coffee',
'web/**/*.coffee',
'web/**/*.html',
'test/**/*.coffee',
]
Just make sure include all your script and template files in your configuration file.
Also, if you're using Grunt or Gulp you can inject bower_components automatically in your Karma configuration.

Jasmine-Jquery not loading JSON file

I am learning writing unit test using Karma-Jasmine for my application build on AngularJs. I want to load test data from a json file. I am using Jasmine-Jquery to read json fixtures. In my karma config file I have following:
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
//dependencies...
'../bower_components/jquery/dist/jquery.js',
'../bower_components/angular/angular.js',
'../bower_components/angular-mocks/angular-mocks.js',
'../bower_components/angular-route/angular-route.js',
// main module app.js.
'../public/app.js',
//all the controllers
'../public/app/controllers/CalculatorCtrl.js',
'../public/app/controllers/ScenaryCtrl.js',
//test dependencies...
'../bower_components/jasmine-jquery/lib/jasmine-jquery.js',
//pattern to include all the test files...
'../public/app/**/*Spec.js',
// JSON fixture
{
pattern: '../public/app/**/*.json',
watched: true,
served: true,
included: false }
],
In my spec file I am doing this:
beforeEach(function(){
jasmine.getJSONFixtures().fixturesPath = 'public/app/controllers/test/fixtures/';
var data=getJSONFixture('myjsonfixtures.json');
console.log(data);
});
When I run test cases I get following error in console:
18 09 2015 18:02:03.841:INFO [Chrome 45.0.2454 (Windows 8.1 0.0.0)]: Connected on socket 1bzPssO0gtZ_lqHlAAAA with id 52911560
Chrome 45.0.2454 (Windows 8.1 0.0.0): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
18 09 2015 18:02:04.288:WARN [web-server]: 404: /public/app/controllers/test/fixtures/myjsonfixtures.json?_=1442579524156
Chrome 45.0.2454 (Windows 8.1 0.0.0) ERROR
Uncaught Error: JSONFixture could not be loaded: public/app/controllers/test/fixtures/myjsonfixtures.json (status: error, message: undefined)
at G:/My%20Temp%20Angular/Calculator/Karma%20with%20Jasmine/bower_components/jasmine-jquery/lib/jasmine-jquery.js:260
Chrome 45.0.2454 (Windows 8.1 0.0.0): Executed 0 of 2 ERROR (0.089 secs / 0 secs)
I don't know why the data is not getting loaded. I am not able to catch what I am missing.

How can I get use phantomjs in my protractor test?

I am trying to use phantomjs without success :(
Using this sample as a testcase:
https://github.com/angular/protractor/blob/master/docs/page-objects.md
my protractor.conf.js looks like this:
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'phantomjs'
},
// Spec patterns are relative to the location of the spec file. They may
// include glob patterns.
suites: {
homepage: '*.spec.js',
search: ['tests/e2e/contact_search/**/*Spec.js',
'tests/e2e/venue_search/**/*Spec.js']
},
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
isVerbose:true,
includeStackTrace: true
}
,
specs: ['example_spec.js']
};
when I run this I get:
"C:\Program Files (x86)\JetBrains\WebStorm 8.0.4\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\lib\cli.js protractor.conf.js
Using the selenium server at http://localhost:4444/wd/hub
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was:
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:148:22)
at Function.webdriver.WebDriver.createSession (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:122:30)
at Builder.build (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:293:22)
at HostedDriverProvider.getDriver (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\hosted.js:63:9)
at c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:238:41
at _fulfilled (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13)
at c:\Users\harry.redknapp\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:573:44
How can I get phantomjs working?

karma running angular test works on Chrome browser but not on PhantomJs

I'm running unit tests in my angular project, and this works fine if I run it with Chrome but, not so much and I use PhantomJS
I have a karma.config.js file like this:
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'lib/*.js',
'web/js/*.js',
'test/spec/*spec.js'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'junit'],
// the default configuration
junitReporter: {
outputFile: 'testResult/test-results.xml',
suite: ''
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
and like this (with Chrome) works
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 36.0.1985 (Windows 7)]: Connected on socket oi7YLBSbpVbZSiVI_BPs
Chrome 36.0.1985 (Windows 7): Executed 8 of 8 SUCCESS (0.238 secs / 0.019 secs)
but if I change the browser (to PhantomJS) gives an error
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket Uy390TQWuDGR2pCi_GRy
PhantomJS 1.9.7 (Windows 7) ERROR
TypeError: '[object NodeList]' is not a valid argument for
'Function.prototype.apply' (evaluating 'push.apply')
at C:/Users/Lino Simões/Documents/bitbucket/jenkins-test/lib/angular.js: 2594
PhantomJS 1.9.7 (Windows 7): Executed 0 of 0 ERROR (0.131 secs / 0 secs)
Warning: Task "karma:unit" failed. Used --force, continuing.
so my question is, why does this work with Chrome but not with PhantomJs and what can I change to make it work with PhantomJS
The '[object NodeList]' is not a valid argument issue, when running in PhantomJS 1.x, is already fixed in angular.js v1.3.0-beta.14, see #7851
Try upgrading the angular.js to v1.3.0-beta.14 or newer.
PS. Another solution would be using PhantomJS 2

Angular Karma e2e with Grunt

I am trying to test
In the grunt file
karma: {
e2e: {
configFile: 'karma-e2e.conf.js',
singleRun: true
}
},
Karma file is basically what Yeoman generated for me. Only change is I swithed Chrome for PhantomJS.
karma-e2e.conf.js:
// Karma configuration
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['ng-scenario'],
// list of files / patterns to load in the browser
files: [
'test/e2e/**/*.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
// Uncomment the following lines if you are using grunt's server to run the tests
// proxies: {
// '/': 'http://localhost:9000/'
// },
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});
};
I have a very basic test I try to run
describe('E2E: Testing Routes:', function () {
'use strict';
beforeEach(function() {
browser().navigateTo('/');
});
it('test', function() {
browser().navigateTo('#/');
expect(browser().location().path()).toBe("/list_persons");
});
})
This is the output from the test. I googled this error and it suggested that I add a "sleep" in my test. That does not sound like a solution for me.
> Running "karma:e2e" (karma) task
INFO [karma]: Karma v0.12.0 server started at http://local:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Linux)]: Connected on socket i0eExVxerWfwrirxJXue with id 46269744
PhantomJS 1.9.7 (Linux): Executed 0 of 1 SUCCESS (0 secs / 0 secs)
PhantomJS 1.9.7 (Linux) E2E: Testing Routes: should jump to the /videos path when / is accessed FAILED
TypeError: 'undefined' is not a function (evaluating '$document.injector()')
PhantomJS 1.9.7 (Linux): Executed 1 of 1 (1 FAILED) ERROR (0.068 secs / 0.077 secs)
Warning: Task "karma:e2e" failed. Use --force to continue.
Can anyone help me. What I want to do is to run e2e tests from grunt in PhantomJS.It does not have to be on a listener for filechanges. One simple run on "grunt test" is perfect.
Edit: I changed files to include
files: [
'app/vendor/scripts/angular.js',
'app/vendor/scripts/angular-mocks.js',
'app/vendor/scripts/angular-route.js',
'app/vendor/scripts/jstd-scenario-adapter-config.js',
'app/vendor/scripts/jstd-scenario-adapter.js',
'app/vendor/scripts/angular-scenario.js',
'test/e2e/**/*.js'
],
Now getting this:
Running "karma:e2e" (karma) task
INFO [karma]: Karma v0.12.0 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Linux)]: Connected on socket ZbZbabDGNCtvVa4Z-LQk with id 99494524
PhantomJS 1.9.7 (Linux): Executed 0 of 0 ERROR (0.036 secs / 0 secs)
Warning: Task "karma:e2e" failed. Use --force to continue.
You have to add this:
singleRun: true,
To your karma config section in your grunt file.
Details:
https://github.com/karma-runner/grunt-karma

Resources