From c745c824235315fd36dce9a1421b6b1268edbd4d Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 7 Aug 2013 16:14:24 +0200 Subject: update karma test runner to fix build --- js/Gruntfile.coffee | 4 +- js/config/karma.js | 135 ++++++++++++++++++++++++---------------------------- js/public/app.js | 2 - 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 . }).call(this); -})(window.angular, window.jQuery, window.moment); \ No newline at end of file -- cgit v1.2.3