Skip to content

Instantly share code, notes, and snippets.

@karthickvkumar
Created October 29, 2018 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthickvkumar/4bcfde8471bdc7cd1a2170e65268179c to your computer and use it in GitHub Desktop.
Save karthickvkumar/4bcfde8471bdc7cd1a2170e65268179c to your computer and use it in GitHub Desktop.
// Karma configuration
// Generated on Thu Oct 18 2018 18:22:53 GMT+0530 (India Standard Time)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
reporters: ['progress', 'html'],
// the default configuration
htmlReporter: {
outputDir: 'karma_html', // where to put the reports
templatePath: null, // set if you moved jasmine_template.html
focusOnFailures: true, // reports show failures on start
namedFiles: false, // name files instead of creating sub-directories
pageTitle: null, // page title for reports; browser info by default
urlFriendlyName: false, // simply replaces spaces with _ for files/dirs
reportName: 'report-summary-filename', // report summary filename; browser info by default
// experimental
preserveDescribeNesting: false, // folded suites stay folded
foldAll: false, // reports start folded (only with preserveDescribeNesting)
},
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
plugins : ['karma-jasmine', 'karma-coverage', 'karma-phantomjs-launcher'],
// list of files / patterns to load in the browser
files: [
'lib/jquery/*.js',
'lib/jquery-ui/*.js',
'./bower_components/angular/angular.js',
'./bower_components/angular-mocks/angular-mocks.js',
'./bower_components/angular-sanitize/angular-sanitize.js',
'lib/angular-ui-router/*.js',
'lib/angular-bootstrap/*.js',
'lib/kendo-ui/*.js',
'lib/moment/*.js',
'lib/angular-date-range-picker/*.js',
'lib/ngStorage/*.js',
'lib/clickOutside/*.js',
'lib/angular-cookie/*.js',
'lib/angular-bg-overlay/*.js',
'lib/angular-session-manager/*.js',
'lib/angular-resizable/*.js',
'lib/angular-tooltipster/*.js',
'lib/angular-ui/*.js',
'lib/ngDraggable/*.js',
'lib/rzslider/*.js',
'assets/js/vendor/*.js',
'app.js',
'common/service/common.service.js',
'common/factories/data-source-interceptor.factory.js',
'common/factories/url/*.js',
'home/home.module.js',
'home/home.service.js',
'home/home.controller.js',
'home/home.html',
'home/Perferences/*.js',
'home/sessionTimeOutWarner/*.js',
'inbox/inbox.module.js',
'inbox/*.js',
'editor/editor.module.js',
'editor/*.js',
'lib/angular-cropper/*.js',
'lib/draggable/*.js',
'lib/sweetAlert/*.js',
//'assets/js/vendor/zip/*.js',
/*test case*/
'unit_test/home/*.js'
],
// list of files / patterns to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'app.js' : ['coverage'],
'home/home.controller.js' : ['coverage']
},
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'coverage'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
//browsers: ['Chrome'],
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment