I am new to TDD. I have configured the karma and gulp for my sources to generate the code coverage. My karma configuration file is given below:
browsers: ['Chrome', 'IE', 'Firefox', 'MyHeadlessChrome'],
frameworks: ['jquery-1.10.2', 'jasmine-jquery', 'jasmine'],
files: [
'**/**/**/**/**.*',
{
pattern: 'js/**/**/**.html',
watched: true,
served: true,
included: false
}
],
port:9878,
concurrency: Infinity,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 1000000,
browserDisconnectTimeout: 1000000,
captureTimeout: 1000000,
retryLimit: 5,
While execution test cases, I am getting below error, a method was in service. It shows that, method was not found.
My package.json configuration is given below:
"devDependencies": {
"eslint-html-reporter": "^0.5.2",
"ghooks": "^1.2.4",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.1",
"gulp-csslint": "^0.3.1",
"gulp-eslint": "^2.0.0",
"gulp-jasmine": "^2.4.1",
"gulp-lesshint": "^2.0.0",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"jasmine-jquery": "^2.1.1",
"jquery-1x": "^1.10.2",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.0",
"karma-html-detailed-reporter": "^1.1.20",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-jasmine-jquery-2": "^0.1.1",
"karma-jquery": "^0.1.0",
"karma-safari-launcher": "^1.0.0"
},
The karma-warning is given below:
06:42:21 [2] [33m13 10 2017 16:14:06.395:WARN [web-server]: [39m404: /Initialize
06:42:21 [2] [33m13 10 2017 16:14:06.397:WARN [web-server]: [39m404: /GetData
06:42:21 [2] [33m13 10 2017 16:14:06.738:WARN [web-server]: [39m404: /GetData
06:42:21 [2] [33m13 10 2017 16:14:06.741:WARN [web-server]: [39m404: /GetData
06:42:21 [2] [33m13 10 2017 16:14:06.744:WARN [web-server]: [39m404: /GetData
06:42:21 [2] [33m13 10 2017 16:14:06.748:WARN [web-server]: [39m404: /GetData
How to avoid the ajax call in karma test runner? And could anyone tell me how to stop ajax call in jasmine or karma?