Skip to content

Instantly share code, notes, and snippets.

@vtanathip
Created August 27, 2013 13:57
Show Gist options
  • Save vtanathip/6353866 to your computer and use it in GitHub Desktop.
Save vtanathip/6353866 to your computer and use it in GitHub Desktop.
Sometime when you use yeoman you must add more config to Gruntfiles.js & karma-e2e.conf.js to complete it. the easiest to test e2e in angular is open server with grunt and add proxies to karma-e2e.conf.js then run it. By the way I found that sometimes when you use old version of angular-generator yo will fail when run test (it will start up but …
//add this config to karma-e2e.conf.js
// 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_';
'use strict';
describe("E2E testing basic route", function() {
beforeEach(function() {
browser().navigateTo('/');
});
it('should navigate to somewhere ', function() {
expect(browser().location().url()).toBe("/");
});
});
karma: {
//add this e2e for load config files
e2e: {
configFile: 'karma-e2e.conf.js',
singleRun: true
},
unit: {
configFile: 'karma.conf.js',
singleRun: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment