Skip to content

Commit

Permalink
#9, misc test framework enhancements.
Browse files Browse the repository at this point in the history
  • Loading branch information
abbr committed Oct 6, 2017
1 parent 9e274e1 commit b3cf414
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 72 deletions.
21 changes: 11 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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
if (process.argv.indexOf('--browsers') < 0) {
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
}

const webpackCfg = require('./webpack.config')
module.exports = function(config) {
config.set({
basePath: '',
Expand Down
137 changes: 135 additions & 2 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 @@ -41,6 +41,7 @@
"copy-webpack-plugin": "^3.0.1",
"cross-env": "^5.0.5",
"css-loader": "^0.23.0",
"enzyme": "^2.9.1",
"eslint": "^4.7.2",
"eslint-loader": "^1.9.0",
"eslint-plugin-react": "^7.3.0",
Expand Down
119 changes: 59 additions & 60 deletions showprepper.sublime-project
Original file line number Diff line number Diff line change
@@ -1,66 +1,65 @@
{
"build_systems": [
{
"cmd": [
"node.exe",
"server.js"
],
"env":
"build_systems": [{
"cmd": [
"node.exe",
"server.js"
],
"env": {
"env": "dev",
"port": "8888"
},
"name": "node-app",
"working_dir": "${project_path}"
},
{
"cmd": [
"npm.cmd",
"test"
],
"name": "npm-run-test",
"working_dir": "${project_path}",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"
},
{
"cmd": [
"npm.cmd",
"run",
"dist"
],
"name": "npm-run-dist",
"working_dir": "${project_path}",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"
},
{
"cmd": [
"node.exe",
"node_modules/karma/bin/karma",
"start",
"--no-single-run",
"--no-colors",
"--browsers",
"Chrome"
],
"env": {
"NODE_ENV": "test"
},
"name": "debug-karma",
"working_dir": "${project_path}"
}
],
"folders": [{
"path": "."
},
{
"env": "dev",
"port": "8888"
"path": "../impress.js"
},
"name": "node-app",
"working_dir": "${project_path}"
},
{
"cmd": [
"npm.cmd",
"test"
],
"name": "npm-run-test",
"working_dir": "${project_path}",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"
},
{
"cmd": [
"npm.cmd",
"run",
"dist"
],
"name": "npm-run-dist",
"working_dir": "${project_path}",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"
},
{
"cmd": [
"node.exe",
"--inspect-brk",
"node_modules/karma/bin/karma",
"start"
],
"env":
{
"NODE_ENV": "test"
"path": "../strut2"
},
"name": "debug-karma",
"working_dir": "${project_path}",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"
}],
"folders": [
{
"path": "."
},
{
"path": "../impress.js"
},
{
"path": "../strut2"
},
{
"path": "../Strut"
}]
{
"path": "../Strut"
}
]
}
1 change: 1 addition & 0 deletions test/components/AppTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('MainComponent', () => {
})

it('should have its component name as default className', () => {
debugger
expect(MainComponent.props.className).to.equal('sp-main-container')
})
})

0 comments on commit b3cf414

Please sign in to comment.