Manu Chadha
Manu Chadha

Reputation: 16723

AngularCLI Karma tests not running on circle CI

I am running karma tests using following Angular script but I get error karma start ./karma.conf.js ERROR [config]: Error in config file! Unexpected token =]

The file runs fine on my windows local machine but gives error when I put it on Bitbucket and run it using Circle CI (continuous Integration)

I do notice that when I change karma.conf.js and put it on bitbucket, I get following warning C:\Users\Manu\Documents\manu\programs\web\angular\dw-ng2-app>git add --all

warning: LF will be replaced by CRLF in karma.conf.js.
The file will have its original line endings in your working directory.

Karma file is

// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular/cli'],
    plugins: [
      require('karma-jasmine'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('@angular/cli/plugins/karma')
    ],
    client:{
      clearContext: false // leave Jasmine Spec Runner output visible in browser
    },
    coverageIstanbulReporter: {
      reports: [ 'html', 'lcovonly' ],
      fixWebpackSourcePaths: true
    },
    angularCli: {
      environment: 'dev'
    },
    reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false
  });
};

Upvotes: 0

Views: 632

Answers (1)

Manu Chadha
Manu Chadha

Reputation: 16723

the problem seemed to be in the config file I created for CircleCI. See npm install fails in circle ci (angular cli project)

Upvotes: 1

Related Questions