mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Add Jest, Enzyme, and sample tests
This commit is contained in:
parent
4a963dbfaa
commit
c56f488b33
5 changed files with 25 additions and 0 deletions
|
@ -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
5
test/.eslintrc.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
jest: true
|
||||
}
|
||||
};
|
5
test/integration/test-integration.test.js
Normal file
5
test/integration/test-integration.test.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
describe('test jest integration', () => {
|
||||
test('testing test', () => {
|
||||
expect('integration').toEqual('integration');
|
||||
});
|
||||
});
|
5
test/localization/test-localization.test.js
Normal file
5
test/localization/test-localization.test.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
describe('test jest localization', () => {
|
||||
test('testing localization test', () => {
|
||||
expect('localization').toEqual('localization');
|
||||
});
|
||||
});
|
5
test/unit/test-unit.test.js
Normal file
5
test/unit/test-unit.test.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
describe('test jest unit', () => {
|
||||
test('testing test', () => {
|
||||
expect('unit').toEqual('unit');
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue