Add Jest, Enzyme, and sample tests

This commit is contained in:
BryceLTaylor 2019-07-17 15:27:13 -04:00
parent 4a963dbfaa
commit c56f488b33
5 changed files with 25 additions and 0 deletions

View file

@ -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",

5
test/.eslintrc.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
env: {
jest: true
}
};

View file

@ -0,0 +1,5 @@
describe('test jest integration', () => {
test('testing test', () => {
expect('integration').toEqual('integration');
});
});

View file

@ -0,0 +1,5 @@
describe('test jest localization', () => {
test('testing localization test', () => {
expect('localization').toEqual('localization');
});
});

View file

@ -0,0 +1,5 @@
describe('test jest unit', () => {
test('testing test', () => {
expect('unit').toEqual('unit');
});
});