Skip to content

Commit

Permalink
test: add test for Node.js ES Modules and CommonJS usage
Browse files Browse the repository at this point in the history
Also remove unused npm script for browser-esmodules
  • Loading branch information
ctavan committed Apr 28, 2020
1 parent 7158302 commit e822c36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -38,3 +38,5 @@ jobs:
if: matrix.node-version == '12.x'
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
- run: npm run test:node
if: matrix.node-version == '12.x' || matrix.node-version == '14.x'
11 changes: 7 additions & 4 deletions package.json
Expand Up @@ -72,16 +72,19 @@
"standard-version": "7.1.0"
},
"scripts": {
"examples:browser-webpack:build": "cd examples/browser-webpack && npm install && npm run build",
"examples:browser-rollup:build": "cd examples/browser-rollup && npm install && npm run build",
"examples:browser-esmodules:build": "cd examples/browser-esmodules && npm install && npm run build",
"examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
"examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
"examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
"examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
"lint": "npm run eslint:check && npm run prettier:check",
"eslint:check": "eslint src/ test/ examples/ *.js",
"eslint:fix": "eslint --fix src/ test/ examples/ *.js",
"pretest": "[ -n $CI ] || npm run build",
"test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
"pretest:browser": "npm run build && npm-run-all --parallel examples:**",
"pretest:browser": "npm run build && npm-run-all --parallel examples:browser:**",
"test:browser": "wdio run ./wdio.conf.js",
"pretest:node": "npm run build",
"test:node": "npm-run-all --parallel examples:node:**",
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
"prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
Expand Down

0 comments on commit e822c36

Please sign in to comment.