mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
Added Karma config for unit tests.
This commit is contained in:
parent
ab2819addd
commit
04418e2e68
3 changed files with 2174 additions and 2 deletions
|
@ -54,8 +54,8 @@ module.exports = function (grunt) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
karma: {
|
karma: {
|
||||||
unit: { options: karmaConfig('test/config/unit.js') },
|
unit: { options: karmaConfig('test/unit/karma.conf.js') },
|
||||||
watch: { options: karmaConfig('test/config/unit.js', { singleRun:false, autoWatch: true}) }
|
watch: { options: karmaConfig('test/unit/karma.conf.js', { singleRun:false, autoWatch: true}) }
|
||||||
},
|
},
|
||||||
html2js: {
|
html2js: {
|
||||||
app: {
|
app: {
|
||||||
|
|
2116
test/assets/angular/angular-mocks.js
vendored
Normal file
2116
test/assets/angular/angular-mocks.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
56
test/unit/karma.conf.js
Normal file
56
test/unit/karma.conf.js
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
// base path, that will be used to resolve files and exclude
|
||||||
|
basePath = '../..';
|
||||||
|
|
||||||
|
// list of files / patterns to load in the browser
|
||||||
|
files = [
|
||||||
|
JASMINE,
|
||||||
|
JASMINE_ADAPTER,
|
||||||
|
'assets/js/jquery-1.11.1.min.js',
|
||||||
|
'assets/js/angularjs/1.2.6/angular.min.js',
|
||||||
|
'assets/js/angularjs/1.2.6/angular-route.min.js',
|
||||||
|
'assets/js/angularjs/1.2.6/angular-resource.min.js',
|
||||||
|
'test/assets/angular/angular-mocks.js',
|
||||||
|
'app/**/*.js',
|
||||||
|
'test/unit/**/*.spec.js',
|
||||||
|
'dist/templates/**/*.js'
|
||||||
|
];
|
||||||
|
|
||||||
|
// use dots reporter, as travis terminal does not support escaping sequences
|
||||||
|
// possible values: 'dots' || 'progress'
|
||||||
|
reporters = 'progress';
|
||||||
|
|
||||||
|
// these are default values, just to show available options
|
||||||
|
|
||||||
|
// web server port
|
||||||
|
port = 8089;
|
||||||
|
|
||||||
|
// cli runner port
|
||||||
|
runnerPort = 9109;
|
||||||
|
|
||||||
|
urlRoot = '/__test/';
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
// polling interval in ms (ignored on OS that support inotify)
|
||||||
|
autoWatchInterval = 0;
|
||||||
|
|
||||||
|
// Start these browsers, currently available:
|
||||||
|
// - Chrome
|
||||||
|
// - ChromeCanary
|
||||||
|
// - Firefox
|
||||||
|
// - Opera
|
||||||
|
// - Safari
|
||||||
|
// - PhantomJS
|
||||||
|
browsers = ['Chrome'];
|
||||||
|
|
||||||
|
// Continuous Integration mode
|
||||||
|
// if true, it capture browsers, run tests and exit
|
||||||
|
singleRun = true;
|
Loading…
Add table
Add a link
Reference in a new issue