diff --git a/package.json b/package.json index 2681b4fa2..b6571d0ef 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,11 @@ "start": "node ./dev-server/index.js", "test": "npm run test:lint && npm run build && npm run test:unit:tap", "test:lint": "eslint . --ext .js,.jsx,.json", + "test:integration:jest": "jest ./test/integration/*.test.js", "test:smoke": "tap ./test/integration-legacy/smoke-testing/*.js --timeout=3600 --no-coverage -R classic", "test:smoke:verbose": "tap ./test/integration-legacy/smoke-testing/*.js --timeout=3600 --no-coverage -R spec", "test:smoke:sauce": "SMOKE_REMOTE=true tap ./test/integration-legacy/smoke-testing/*.js --timeout=60000 --no-coverage -R classic", + "test:unit:jest": "jest ./test/unit/*.test.js && jest ./test/localization/*.test.js", "test:unit:tap": "tap ./test/{unit-legacy,localization-legacy}/*.js --no-coverage -R classic", "test:coverage": "tap ./test/{unit-legacy,localization-legacy}/*.js --coverage --coverage-report=lcov", "build": "npm run clean && npm run translate && webpack --bail", @@ -66,6 +68,8 @@ "copy-webpack-plugin": "0.2.0", "create-react-class": "15.6.2", "css-loader": "0.23.1", + "enzyme": "3.10.0", + "enzyme-adapter-react-16": "1.14.0", "eslint": "4.7.1", "eslint-config-scratch": "5.0.0", "eslint-plugin-cypress": "^2.0.1", @@ -82,6 +86,7 @@ "google-libphonenumber": "3.2.3", "html-webpack-plugin": "2.22.0", "iso-3166-2": "0.4.0", + "jest": "^23.6.0", "json-loader": "0.5.2", "json2po-stream": "1.0.3", "keymirror": "0.1.1", diff --git a/test/.eslintrc.js b/test/.eslintrc.js new file mode 100644 index 000000000..26ef5d954 --- /dev/null +++ b/test/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + env: { + jest: true + } +}; diff --git a/test/integration/test-integration.test.js b/test/integration/test-integration.test.js new file mode 100644 index 000000000..44c96735d --- /dev/null +++ b/test/integration/test-integration.test.js @@ -0,0 +1,5 @@ +describe('test jest integration', () => { + test('testing test', () => { + expect('integration').toEqual('integration'); + }); +}); diff --git a/test/localization/test-localization.test.js b/test/localization/test-localization.test.js new file mode 100644 index 000000000..012e67810 --- /dev/null +++ b/test/localization/test-localization.test.js @@ -0,0 +1,5 @@ +describe('test jest localization', () => { + test('testing localization test', () => { + expect('localization').toEqual('localization'); + }); +}); diff --git a/test/unit/test-unit.test.js b/test/unit/test-unit.test.js new file mode 100644 index 000000000..d29619cfd --- /dev/null +++ b/test/unit/test-unit.test.js @@ -0,0 +1,5 @@ +describe('test jest unit', () => { + test('testing test', () => { + expect('unit').toEqual('unit'); + }); +});