module.exports = function (config) {
config.set({
// The root path location that will be used to resolve all relative paths defined in files and exclude. If the basePath configuration is a relative path then it will be resolved to the __dirname of the configuration file.
basePath: '',
// List of test frameworks you want to use. Typically, you will set this to ['jasmine'], ['mocha'] or ['qunit']...
frameworks: ['jasmine'],
// List of files/patterns to load in the browser.
// included: to browser
files: [
{pattern: "src/**/*.js", included: true},
{pattern: "tests/**/*.js", included: true}
],
// List of files/patterns to exclude from loaded files.
exclude: [],
// A list of reporters to use.
reporters: ['progress'],
// The port where the web server will be listening.
port: 9876,
// Enable or disable colors in the output (reporters and logs).
colors: true,
// Level of logging.
logLevel: config.LOG_INFO,
// Enable or disable watching files and executing the tests whenever one of these files changes.
autoWatch: true,
// A list of browsers to launch and capture. When Karma starts up, it will also start up each browser which is placed within this setting. Once Karma is shut down, it will shut down these browsers as well. You can capture any browser manually by opening the browser and visiting the URL where the Karma web server is listening (by default it is http://localhost:9876/).
//Firefox: npm install karma-firefox-launcher --save-dev
//Chrom: npm install karma-chrome-launcher --save-dev
//IE: npm install karma-ie-launcher --save-dev
browsers: ['Firefox', 'Chrome', 'IE'],
// Timeout for capturing a browser (in ms).
captureTimeout: 60000,
// Continuous Integration mode.
singleRun: false
});
};
Gruntfile.js
karma.conf.js