summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-08-07 16:14:24 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-08-07 16:14:24 +0200
commitc745c824235315fd36dce9a1421b6b1268edbd4d (patch)
tree3fd87e83bccf598f1e0d836f0a7c09568de2c3df
parentc1adf7d39ddf068f93c22083ab4b9ea0e092ea51 (diff)
update karma test runner to fix build
-rw-r--r--js/Gruntfile.coffee4
-rw-r--r--js/config/karma.js135
-rw-r--r--js/public/app.js2
3 files changed, 63 insertions, 78 deletions
diff --git a/js/Gruntfile.coffee b/js/Gruntfile.coffee
index c76c34152..2e44d0c2c 100644
--- a/js/Gruntfile.coffee
+++ b/js/Gruntfile.coffee
@@ -101,9 +101,7 @@ module.exports = (grunt) ->
configFile: 'config/karma.js'
singleRun: true
browsers: ['PhantomJS']
- reporters: ['progress', 'junit']
- junitReporter:
- outputFile: 'test-results.xml'
+ reporters: ['progress']
unit_phantom:
configFile: 'config/karma.js'
browsers: ['PhantomJS']
diff --git a/js/config/karma.js b/js/config/karma.js
index d5cb87ba0..0f132b1fc 100644
--- a/js/config/karma.js
+++ b/js/config/karma.js
@@ -24,76 +24,65 @@
// 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,
- 'vendor/jquery/jquery.js',
- 'vendor/jquery-ui/jquery-ui.js',
- 'vendor/angular/angular.js',
- 'vendor/angular/angular-mocks.js',
- 'vendor/angular-ui/angular-ui.js',
- 'vendor/momentjs/moment.js',
- '../../appframework/js/tests/stubs/owncloud.js',
- '../../appframework/js/public/app.js',
- 'tests/stubs/modules.js',
- 'build/app/directives/*.js',
- 'build/app/services/**/*.js',
- 'build/app/controllers/**/*.js',
- 'build/tests/**/*Spec.js'
-];
-
-
-// list of files to exclude
-exclude = [
- 'build/app/app.js'
-];
-
-
-// test results reporter to use
-// possible values: 'dots', 'progress', 'junit'
-reporters = ['progress'];
-
-
-// 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;
-
-
-// enable / disable watching file and executing tests whenever any file changes
-autoWatch = true;
-
-
-// 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;
+module.exports = function(config) {
+ config.set({
+ frameworks: ['jasmine'],
+ basePath: '../',
+ // list of files / patterns to load in the browser
+ files: [
+ 'vendor/jquery/jquery.js',
+ 'vendor/jquery-ui/jquery-ui.js',
+ 'vendor/angular/angular.js',
+ 'vendor/angular/angular-mocks.js',
+ 'vendor/angular-ui/angular-ui.js',
+ 'vendor/momentjs/moment.js',
+ '../../appframework/js/tests/stubs/owncloud.js',
+ '../../appframework/js/public/app.js',
+ 'tests/stubs/modules.js',
+ 'build/app/directives/*.js',
+ 'build/app/services/**/*.js',
+ 'build/app/controllers/**/*.js',
+ 'build/tests/**/*Spec.js'
+ ],
+
+ // list of files to exclude
+ exclude: ['build/app/app.js'],
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress', 'junit'
+ reporters: ['progress'],
+
+ // 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: config.LOG_INFO,
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+ // 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
+ });
+}; \ No newline at end of file
diff --git a/js/public/app.js b/js/public/app.js
index 7b4cdeb3e..39cd509c4 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -1,4 +1,3 @@
-(function(angular, $, moment, undefined){
/**
* ownCloud News App - v0.0.1
@@ -3245,4 +3244,3 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
}).call(this);
-})(window.angular, window.jQuery, window.moment); \ No newline at end of file