From 00c3c0c02e4d40a680ad1cf14ce3ffae29fe67e3 Mon Sep 17 00:00:00 2001 From: Dmitri Pavlutin Date: Thu, 26 Dec 2019 10:53:39 +0200 Subject: [PATCH] Migrate to Jest --- .babelrc | 7 ++++++- jest.config.js | 2 +- package.json | 12 +++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.babelrc b/.babelrc index 98c9978..677ecac 100644 --- a/.babelrc +++ b/.babelrc @@ -12,5 +12,10 @@ "root": ["./src"] } ] - ] + ], + "env": { + "test": { + "plugins": [["@babel/plugin-transform-modules-commonjs"]] + } + } } diff --git a/jest.config.js b/jest.config.js index 658fd4c..5e1643e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,7 @@ module.exports = { verbose: true, modulePaths: ['/src/'], collectCoverageFrom: ['src/**/*.js'], - testMatch: ['/test/**/*.js'], + testMatch: ['/test/*/*.js'], testURL: 'http://localhost', testPathIgnorePatterns: ['node_modules', '.cache'], transformIgnorePatterns: [ diff --git a/package.json b/package.json index 240f35a..7fc8495 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "bugs": { "url": "https://github.com/panzerdp/voca/issues", - "email": "dmitri@rainsoft.io" + "email": "dmitripavlutin@gmail.com" }, "main": "index.js", "jsnext:main": "index.es2015.js", @@ -39,8 +39,8 @@ "build-dist": "rollup -c config/rollup/dist/umd-min.js && rollup -c config/rollup/dist/umd.js", "build-npm-package": "rollup -c config/rollup/module/cjs-all.js && rollup -c config/rollup/module/es.js && rollup -c config/rollup/module/umd.js", "prepare-npm-package": "rm -rf dist_mod && mkdir dist_mod && cp package.json README.md LICENSE.md ./dist_mod", - "test": "mocha test/index.js --reporter dot", - "coverage": "istanbul cover _mocha -- test/index.js --reporter spec", + "test": "jest", + "coverage": "jest --coverage", "report-coverage": "cat ./coverage/lcov.info | codecov", "verify": "npm run eslint && npm run coverage", "jsdoc": "jsdoc --configure .jsdoc.json", @@ -67,15 +67,9 @@ "codecov.io": "0.1.6", "eslint": "6.8.0", "glob": "7.1.6", - "grunt": "1.0.4", - "grunt-contrib-connect": "2.1.0", - "grunt-saucelabs": "9.0.1", "husky": "3.1.0", - "istanbul": "1.1.0-alpha.1", "jest": "24.9.0", "jsdoc": "3.6.3", - "mkdirp": "0.5.1", - "mocha": "6.2.2", "rollup": "1.27.14", "rollup-plugin-babel": "4.3.3", "rollup-plugin-uglify": "6.0.4",