Skip to content

Commit

Permalink
#9 added puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
abbr committed Sep 21, 2017
1 parent b4a41fe commit bd45ce1
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 4 deletions.
20 changes: 16 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
var webpackCfg = require('./webpack.config')
const webpackCfg = require('./webpack.config')
const ChromiumRevision = require('puppeteer/package.json').puppeteer
.chromium_revision
const Downloader = require('puppeteer/utils/ChromiumDownloader')
const revisionInfo = Downloader.revisionInfo(
Downloader.currentPlatform(),
ChromiumRevision
)

process.env.CHROME_BIN = revisionInfo.executablePath

module.exports = function(config) {
config.set({
basePath: '',
browsers: ['PhantomJS'],
browsers: ['ChromeHeadless'],
files: ['test/loadtests.js'],
port: 8080,
captureTimeout: 60000,
frameworks: ['phantomjs-shim', 'mocha', 'chai'],
frameworks: ['mocha', 'chai'],
client: {
mocha: {}
},
colors: true,
singleRun: true,
logLevel: config.LOG_INFO,
reporters: ['mocha', 'coverage'],
preprocessors: {
'test/loadtests.js': ['webpack', 'sourcemap']
Expand All @@ -23,6 +34,7 @@ module.exports = function(config) {
coverageReporter: {
dir: 'coverage/',
reporters: [{ type: 'html' }, { type: 'text' }]
}
},
concurrency: Infinity
})
}
100 changes: 100 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"postcss": "^5.0.11",
"postcss-loader": "^0.8.0",
"prop-types": "^15.5.10",
"puppeteer": "^0.10.2",
"react": "^15.0.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
Expand Down

0 comments on commit bd45ce1

Please sign in to comment.