diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:07:07 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:19:39 +0100 |
commit | afb9fba64be1f15a3ce3ed31214a704e73e5e8bb (patch) | |
tree | 6f69712a8c976178c05144483ff0c8e9b09445c8 /thirdparty/preact/test/karma.conf.js | |
parent | b37e7762bb5492cbd6788863232e7d2634ab5e5c (diff) | |
parent | 6e5fb04d3f3f9a6cd43ac20896d73321dd079f96 (diff) | |
download | wallet-core-afb9fba64be1f15a3ce3ed31214a704e73e5e8bb.tar.xz |
Update preact version
Diffstat (limited to 'thirdparty/preact/test/karma.conf.js')
-rw-r--r-- | thirdparty/preact/test/karma.conf.js | 55 |
1 files changed, 42 insertions, 13 deletions
diff --git a/thirdparty/preact/test/karma.conf.js b/thirdparty/preact/test/karma.conf.js index 6ed5397fb..3236e944b 100644 --- a/thirdparty/preact/test/karma.conf.js +++ b/thirdparty/preact/test/karma.conf.js @@ -1,45 +1,66 @@ /*eslint no-var:0, object-shorthand:0 */ var coverage = String(process.env.COVERAGE)!=='false', - sauceLabs = String(process.env.SAUCELABS).match(/^(1|true)$/gi) && !String(process.env.TRAVIS_PULL_REQUEST).match(/^(1|true)$/gi), - performance = !coverage && !sauceLabs && String(process.env.PERFORMANCE)!=='false', + ci = String(process.env.CI).match(/^(1|true)$/gi), + pullRequest = !String(process.env.TRAVIS_PULL_REQUEST).match(/^(0|false|undefined)$/gi), + realBrowser = String(process.env.BROWSER).match(/^(1|true)$/gi), + sauceLabs = realBrowser && ci && !pullRequest, + performance = !coverage && !realBrowser && String(process.env.PERFORMANCE)!=='false', webpack = require('webpack'); var sauceLabsLaunchers = { sl_chrome: { base: 'SauceLabs', - browserName: 'chrome' + browserName: 'chrome', + platform: 'Windows 10' }, sl_firefox: { base: 'SauceLabs', - browserName: 'firefox' + browserName: 'firefox', + platform: 'Windows 10' }, - sl_ios_safari: { + sl_safari: { base: 'SauceLabs', - browserName: 'iphone', - platform: 'OS X 10.9', - version: '7.1' + browserName: 'safari', + platform: 'OS X 10.11' + }, + sl_edge: { + base: 'SauceLabs', + browserName: 'MicrosoftEdge', + platform: 'Windows 10' }, sl_ie_11: { base: 'SauceLabs', browserName: 'internet explorer', - version: '11' + version: '11.103', + platform: 'Windows 10' }, sl_ie_10: { base: 'SauceLabs', browserName: 'internet explorer', - version: '10' + version: '10.0', + platform: 'Windows 7' }, sl_ie_9: { base: 'SauceLabs', browserName: 'internet explorer', - version: '9' + version: '9.0', + platform: 'Windows 7' } }; +var travisLaunchers = { + chrome_travis: { + base: 'Chrome', + flags: ['--no-sandbox'] + } +}; + +var localBrowsers = realBrowser ? Object.keys(travisLaunchers) : ['PhantomJS']; + module.exports = function(config) { config.set({ - browsers: sauceLabs ? Object.keys(sauceLabsLaunchers) : ['PhantomJS'], + browsers: sauceLabs ? Object.keys(sauceLabsLaunchers) : localBrowsers, frameworks: ['source-map-support', 'mocha', 'chai-sinon'], @@ -69,14 +90,18 @@ module.exports = function(config) { browserNoActivityTimeout: 5 * 60 * 1000, + // Use only two browsers concurrently, works better with open source Sauce Labs remote testing + concurrency: 2, + // sauceLabs: { // tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER || ('local'+require('./package.json').version), // startConnect: false // }, - customLaunchers: sauceLabsLaunchers, + customLaunchers: sauceLabs ? sauceLabsLaunchers : travisLaunchers, files: [ + { pattern: 'polyfills.js', watched: false }, { pattern: '{browser,shared}/**.js', watched: false } ], @@ -107,6 +132,10 @@ module.exports = function(config) { } : []) }, resolve: { + // The React DevTools integration requires preact as a module + // rather than referencing source files inside the module + // directly + alias: { preact: '../src/preact' }, modulesDirectories: [__dirname, 'node_modules'] }, plugins: [ |