diff --git a/.gitmodules b/.gitmodules index fca120b..3c46120 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "benchmark/chartjs"] path = benchmark/chartjs url = https://github.com/nnnick/Chart.js.git +[submodule "tools"] + path = tools + url = https://github.com/Polymer/tools.git diff --git a/conf/karma.conf.js b/conf/karma.conf.js index 7245d1b..fcf85d1 100644 --- a/conf/karma.conf.js +++ b/conf/karma.conf.js @@ -1,5 +1,6 @@ module.exports = function(karma) { - karma.set({ + var common = require('../tools/test/karma-common.conf.js'); + karma.set(common.mixin_common_opts(karma, { // base path, that will be used to resolve files and exclude basePath: '../', @@ -17,69 +18,5 @@ module.exports = function(karma) { 'tests/d8_array_fuzzer.js', 'tests/d8_planner_test.js' ], - - frameworks: ['mocha'], - - // use dots reporter, as travis terminal does not support escaping sequences - // possible values: 'dots', 'progress', 'junit', 'teamcity' - // CLI --reporters progress - reporters: ['progress'], - - // web server port - // CLI --port 9876 - port: 9876, - - // cli runner port - // CLI --runner-port 9100 - runnerPort: 9100, - - // enable / disable colors in the output (reporters and logs) - // CLI --colors --no-colors - colors: true, - - // level of logging - // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG - // CLI --log-level debug - logLevel: karma.LOG_INFO, - - // enable / disable watching file and executing tests whenever any file changes - // CLI --auto-watch --no-auto-watch - autoWatch: true, - - // Start these browsers, currently available: - // - Chrome - // - ChromeCanary - // - Firefox - // - Opera - // - Safari (only Mac) - // - PhantomJS - // - IE (only Windows) - // CLI --browsers Chrome,Firefox,Safari - browsers: ['ChromeCanary'], - - // If browser does not capture in given timeout [ms], kill it - // CLI --capture-timeout 5000 - captureTimeout: 50000, - - // Auto run tests on start (when browsers are captured) and exit - // CLI --single-run --no-single-run - singleRun: true, - - // report which specs are slower than 500ms - // CLI --report-slower-than 500 - reportSlowerThan: 500, - - // compile coffee scripts - preprocessors: { - }, - - plugins: [ - 'karma-mocha', - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-ie-launcher', - 'karma-script-launcher', - 'karma-crbot-reporter' - ] - }); + })); }; diff --git a/gruntfile.js b/gruntfile.js index 1fb3a35..c09bccd 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -13,28 +13,6 @@ // limitations under the License. module.exports = function(grunt) { - - // karma setup - var browsers; - (function() { - try { - var config = grunt.file.readJSON('local.json'); - if (config.browsers) { - browsers = config.browsers; - } - } catch (e) { - var os = require('os'); - browsers = ['Chrome', 'Firefox']; - //browsers = ['Chrome']; - if (os.type() === 'Darwin') { - browsers.push('ChromeCanary'); - } - if (os.type() === 'Windows_NT') { - browsers.push('IE'); - } - } - })(); - grunt.initConfig({ karma: { options: { @@ -42,12 +20,10 @@ module.exports = function(grunt) { keepalive: true }, buildbot: { - browsers: browsers, reporters: ['crbot'], logLevel: 'OFF' }, 'observe-js': { - browsers: browsers } } }); diff --git a/package.json b/package.json index 6cc639f..07399bc 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "grunt-karma": "*", "karma-mocha": "*", "karma-ie-launcher": "*", + "karma-safari-launcher": "*", "karma-script-launcher": "*", "karma-crbot-reporter": "*" } diff --git a/tools b/tools new file mode 160000 index 0000000..93f21ac --- /dev/null +++ b/tools @@ -0,0 +1 @@ +Subproject commit 93f21ac3de9e71e054a8d4875a5d77852f4f769d