Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Sauce with idleTimeout 1000 #36

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
24 changes: 24 additions & 0 deletions karma-ci.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var server = require('karma').server
var common = require('./karma-conf-common')
var getBrowsers = require('policystat-sauce-browsers')
var xtend = require('xtend')
var forEach = require('foreach')

common.reporters.push('saucelabs')

var conf = xtend(common, {
singleRun: true,
captureTimeout: 0
})

getBrowsers.then(function (browsers) {
forEach(browsers, function (browser) {
browser.idleTimeout = '1000'
})
conf.customLaunchers = browsers
conf.browsers = Object.keys(browsers)
conf.logLevel = 'debug'
server.start(conf, function (exitCode) {
process.exit(exitCode)
})
})
12 changes: 12 additions & 0 deletions karma-conf-common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var SPEC_FILE_PATH = 'test/spec.js'

var common = {}

common.frameworks = ['browserify', 'jasmine']
common.files = [SPEC_FILE_PATH]
common.preprocessors = {}
common.preprocessors[SPEC_FILE_PATH] = 'browserify'
common.browserify = {debug: true}
common.reporters = ['progress']

module.exports = common
16 changes: 0 additions & 16 deletions karma.conf.js

This file was deleted.

5 changes: 5 additions & 0 deletions karma.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var server = require('karma').server
var common = require('./karma-conf-common')
server.start(common, function (exitCode) {
process.exit(exitCode)
})
11 changes: 6 additions & 5 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ content.dependencies = {
content.devDependencies = {
mightyiam: '^1.1.5',
policystat: '^1.2.2',
'policystat-sauce-browsers': '2.0.0',
'auto-package': '^0.2.0',
'es5-shim': '^4.1.0',
'foreach': '^2.0.5',
'jasmine-core': '^2.2.0',
'karma': '^0.12.31',
'karma-browserify': '^3.0.2',
'karma-chrome-launcher': '^0.1.7',
'karma-cli': '0.0.4',
'karma-firefox-launcher': '^0.1.4',
'karma-sauce-launcher': '^0.2.10',
'karma-jasmine': '^0.3.5',
'keysim': '^1.1.2',
'randomatic': '^1.1.0',
'selenium-server': '^2.44.0',
'standard': '^2.4.4',
'license-generator': '^0.0.13',
'xtend': '^4.0.0',
'verb-cli': '^0.4.4'
}
content.repository = {
Expand All @@ -42,8 +42,9 @@ content.scripts = {
' -n "' + policystat.name.pretty + '"',
'docs': 'verb',
'lint': 'standard',
'test-browsers': 'karma start',
'test': 'npm run license && npm run docs && npm run lint && npm run test-browsers'
'unit-local': 'node karma.js',
'unit-ci': 'node karma-ci.js',
'test': 'npm run license && npm run docs && npm run lint && npm run unit-ci'
}
content.keywords = [
'contentEditable',
Expand Down