Skip to content

Commit

Permalink
Merge pull request #138 from declandewet/jest
Browse files Browse the repository at this point in the history
migrate to jest from ava
  • Loading branch information
Declan de Wet authored Jan 11, 2018
2 parents d5f9e08 + e52a041 commit 4b90cbd
Show file tree
Hide file tree
Showing 33 changed files with 2,285 additions and 3,734 deletions.
5 changes: 1 addition & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
'use strict';

const isCjsEnv = process.env.BABEL_ENV === 'cjs';
const isEsEnv = process.env.BABEL_ENV === 'es';

module.exports = {
Expand All @@ -16,7 +13,7 @@ module.exports = {
],

plugins: [
...(isCjsEnv ? ['add-module-exports'] : []),
...(isEsEnv ? [] : ['add-module-exports']),
'transform-class-properties',
'transform-export-extensions',
'transform-runtime',
Expand Down
13 changes: 1 addition & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
'use strict';

module.exports = {
root: true,
extends: ['plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2017,
sourceType: 'script',
sourceType: 'module',
},
parser: 'babel-eslint',

rules: {
strict: [2, 'global'],
},

overrides: [
{
files: ['src/**/*.js'],
parserOptions: {
sourceType: 'module',
},
},
],
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ node_js:
- "6"
- "5"
script:
- npm run test-ci
- npm test
after_script:
- npm run codecov
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ platform:
install:
- ps: Install-Product node $env:nodejs_version $env:platform
- set CI=true
- set AVA_APPVEYOR=true
- npm install -g npm@latest || (timeout 30 && npm install -g npm@latest)
- set PATH=%APPDATA%\npm;%PATH%
- npm install || (timeout 30 && npm install)
test_script:
# Output useful info for debugging.
- node --version && npm --version
- cmd: npm run test-ci
- cmd: npm test
build: off
shallow_clone: true
clone_depth: 1
Expand Down
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
verbose: true,
collectCoverage: true,
bail: true,
coverageDirectory: './coverage/',
testEnvironment: 'node',
};
Loading

0 comments on commit 4b90cbd

Please sign in to comment.