From 290be543a53024ed1898954269fb6766a8a5f7e0 Mon Sep 17 00:00:00 2001 From: Simon Egersand <s.egersand@gmail.com> Date: Thu, 09 Feb 2017 20:41:48 +0100 Subject: [PATCH] Use Jest and Enzyme for testing --- package.json | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5449ca6..7fd4726 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "build:win": "./node_modules/.bin/gulp.cmd", "dev": "./node_modules/.bin/webpack-dev-server --config example/webpack.config.js --devtool eval --progress --colors --hot --content-base example", "lint": "./node_modules/.bin/eslint src/ DateTime.js", - "test": "node node_modules/mocha/bin/mocha tests", + "test": "./node_modules/.bin/jest", "test:all": "npm run test:typings && npm run test", "test:typings": "./node_modules/.bin/tsc -p ./typings", - "test:watch": "node node_modules/mocha/bin/mocha --watch tests" + "test:watch": "./node_modules/.bin/jest --watch" }, "keywords": [ "react", @@ -45,9 +45,12 @@ "devDependencies": { "@types/react": "^0.14.49", "babel-core": "^6.22.1", + "babel-jest": "^18.0.0", "babel-loader": "^6.2.1", "babel-plugin-transform-remove-strict-mode": "0.0.2", - "babel-preset-es2015": "^6.22", + "babel-preset-es2015": "^6.22.0", + "babel-preset-react": "^6.22.0", + "enzyme": "^2.7.1", "eslint": "^3.1.0", "gulp": "^3.9.0", "gulp-babel": "^6.1", @@ -56,6 +59,8 @@ "gulp-rename": "^1.2.2", "gulp-sourcemaps": "^2.4.0", "gulp-uglify": "^1.2.0", + "jest": "^18.1.0", + "jest-cli": "^18.1.0", "jsdom": "^7.0.2", "mocha": "^3.2.0", "moment": ">=2.16.0", @@ -63,6 +68,7 @@ "react": ">=0.13", "react-addons-test-utils": ">=0.13", "react-dom": ">=0.13", + "react-test-renderer": "^15.4.2", "through2": "^2.0.3", "typescript": "^2.0.10", "webpack": "^2.2.1", -- Gitblit v1.9.3