Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when running angularjs karma sample

In the introtokarma app, I changed the karma-e2e-config.js file as follows:

module.exports = function(config) {
  config.set({
    basePath : '../',
      files : ['tests/e2e/**/*.js'],
      frameworks: ['ng-scenario'],
      autoWatch : false,
      browsers : ['Chrome'],
      singleRun : true,
      proxies : {
        '/': 'http://localhost:8000/'
      },
      junitReporter : {
        outputFile: 'test_out/e2e.xml',
        suite: 'e2e'
      }
  });
};

When running the code, I get the following output:

C:\Project\introtokarma\config>karma start karma-e2e.conf.js
INFO [karma]: Karma v0.10.1 server started at localhost:9877/
INFO [launcher]: Starting browser Chrome
WARN [launcher]: The path should not be quoted.
Normalized the path to C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
INFO [Chrome 28.0.1500 (Windows 7)]: Connected on socket id pfBNNRs-3wAdgT-QsheL
Chrome 28.0.1500 (Windows 7): Executed 0 of 0 ERROR (0.207 secs / 0 secs)

like image 697
Mel Avatar asked Aug 08 '13 19:08

Mel


People also ask

How to run Karma tests AngularJS?

Testing in AngularJS is achieved by using the karma framework, a framework which has been developed by Google itself. The karma framework is installed using the node package manager. The key modules which are required to be installed for basic testing are karma, karma-chrome-launcher ,karma-jasmine, and karma-cli.

What is Karma for testing Angular?

Karma is a direct product of the AngularJS team from struggling to test their own framework features with existing tools. As a result of this, they made Karma and have transitioned it to Angular as the default test runner for applications created with the Angular CLI.

What is Karma Conf JS in Angular?

The karma. conf. js file is a partial Karma configuration file. The CLI constructs the full runtime configuration in memory, based on application structure specified in the angular. json file, supplemented by karma.


1 Answers

For karma v0.10.2 and latest angular-phonecat try next command:

npm install -g karma-ng-scenario karma-junit-reporter

like image 70
rkshnsk Avatar answered Oct 05 '22 08:10

rkshnsk