mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 16:16:50 +00:00
halfway through fixing karma
This commit is contained in:
parent
76175cea21
commit
2ffdc983f3
@ -26,6 +26,12 @@ module.exports = function(grunt) {
|
||||
all: ['Gruntfile.js', '<%= mifosx.app %>/scripts/**/*.js']
|
||||
},
|
||||
|
||||
karma: {
|
||||
unit: {
|
||||
configFile: 'karma.conf.js'
|
||||
}
|
||||
},
|
||||
|
||||
//uglify the js files
|
||||
uglify: {
|
||||
options: {
|
||||
@ -193,6 +199,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
|
||||
// Default task(s).
|
||||
|
||||
@ -200,5 +207,6 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('prod', ['clean', 'copy:prod', 'concat', 'uglify:prod']);
|
||||
grunt.registerTask('dev', ['clean', 'copy:dev']);
|
||||
grunt.registerTask('compile', ['jshint']);
|
||||
grunt.registerTask('test', ['karma']);
|
||||
|
||||
};
|
||||
@ -1,56 +1,57 @@
|
||||
// Karma configuration
|
||||
|
||||
// base path, that will be used to resolve files and exclude
|
||||
basePath = '';
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath : '',
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files = [
|
||||
JASMINE,
|
||||
JASMINE_ADAPTER,
|
||||
'app/bower_components/angular/angular.js',
|
||||
'app/bower_components/angular-mocks/angular-mocks.js',
|
||||
'app/scripts/*.js',
|
||||
'app/scripts/**/*.js',
|
||||
'test/mock/**/*.js',
|
||||
'test/spec/**/*.js'
|
||||
];
|
||||
// Fix for "JASMINE is not supported anymore" warning
|
||||
frameworks : ["jasmine", "requirejs"],
|
||||
|
||||
// list of files to exclude
|
||||
exclude = [];
|
||||
files : [
|
||||
'app/bower_components/angular/angular.js',
|
||||
'app/bower_components/angular-mocks/angular-mocks.js',
|
||||
'app/scripts/loader.js',
|
||||
// 'app/scripts/*.js',
|
||||
// 'app/scripts/**/*.js',
|
||||
'test/spec/**/*.js'
|
||||
],
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: dots || progress || growl
|
||||
reporters = ['progress'];
|
||||
// list of files to exclude
|
||||
exclude : [],
|
||||
|
||||
// web server port
|
||||
port = 8080;
|
||||
// test results reporter to use
|
||||
// possible values: dots || progress || growl
|
||||
reporters : ['progress'],
|
||||
|
||||
// cli runner port
|
||||
runnerPort = 9100;
|
||||
// web server port
|
||||
port : 8080,
|
||||
|
||||
|
||||
// cli runner port
|
||||
runnerPort : 9100,
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors : true,
|
||||
|
||||
// level of logging
|
||||
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
|
||||
logLevel : LOG_INFO,
|
||||
|
||||
autoWatch : false,
|
||||
|
||||
browsers : ['Chrome'],
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout : 5000,
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, it capture browsers, run tests and exit
|
||||
singleRun : true
|
||||
});
|
||||
}
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors = true;
|
||||
|
||||
// level of logging
|
||||
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
|
||||
logLevel = LOG_INFO;
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch = false;
|
||||
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers = ['Chrome'];
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout = 5000;
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, it capture browsers, run tests and exit
|
||||
singleRun = false;
|
||||
|
||||
13
package.json
13
package.json
@ -10,7 +10,18 @@
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-requirejs": "~0.3.1"
|
||||
"grunt-contrib-requirejs": "~0.3.1",
|
||||
"karma-script-launcher": "~0.1.0",
|
||||
"karma-chrome-launcher": "~0.1.1",
|
||||
"karma-html2js-preprocessor": "~0.1.0",
|
||||
"karma-firefox-launcher": "~0.1.2",
|
||||
"karma-jasmine": "~0.1.4",
|
||||
"requirejs": "~2.1.9",
|
||||
"karma-requirejs": "~0.2.0",
|
||||
"karma-coffee-preprocessor": "~0.1.1",
|
||||
"karma-phantomjs-launcher": "~0.1.1",
|
||||
"karma": "~0.10.8",
|
||||
"grunt-karma": "~0.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user