Skip to content

Commit

Permalink
tests: fix test bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Nov 29, 2018
1 parent f47bfd5 commit 17adfc2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
38 changes: 38 additions & 0 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"lint": "tslint --project tsconfig.json --fix --format stylish ./src/**/*.ts",
"test": "jest",
"test:comms": "rollup -c rollup-tests.config.js && http-server",
"test:comms": "rollup -c rollup-tests.config.js",
"cover": "jest --collectCoverage",
"start": "gulp",
"build": "tsc && gulp build && npm run docs",
Expand Down Expand Up @@ -49,13 +49,13 @@
"gulp": "^3.9.1",
"gulp-connect": "^5.5.0",
"gulp-plumber": "^1.2.0",
"http-server": "^0.11.1",
"jest": "^23.6.0",
"js-yaml": "^3.11.0",
"nunjucks": "^3.1.3",
"redoc": "^2.0.0-alpha.20",
"replace-ext": "^1.0.0",
"rollup": "^0.67.3",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-typescript2": "^0.18.0",
"semantic-release": "^15.10.5",
Expand Down
13 changes: 11 additions & 2 deletions rollup-tests.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import typescript from 'rollup-plugin-typescript2'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'

const plugins = [
resolve(),
typescript({
tsconfigOverride: {
compilerOptions: {
module: 'ES2015'
}
},
useTsconfigDeclarationDir: true
})
}),
resolve({
// From https://github.com/rollup/rollup-plugin-node-resolve:
// some package.json files have a `browser` field which
// specifies alternative files to load for people bundling
// for the browser. If that's you, use this option, otherwise
// pkg.browser will be ignored
browser: true // Default: false
}),
commonjs()
]

export default [{
Expand Down

0 comments on commit 17adfc2

Please sign in to comment.