1{ 2 "name": "webconsole-tests", 3 "version": "0.0.1", 4 "scripts": { 5 "//": [ 6 "Here's the script to run tests with `npm test`. Here's what it does: ", 7 " * Run mocha on components, middleware, store and utils folders, on .test.js files.", 8 " We need to specify them so we don't run unwanted tests (e.g. in node_modules).", 9 " * We require jsdom-global to inject `document` and `window` objects which are", 10 " not in nodejs natively.", 11 " * Finally we require mocha-test-setup where we configure Enzyme and", 12 " intercept require() calls with require-hacker and modify them if needed." 13 ], 14 "test": "mocha \"./{,!(node_modules)/**}/*.test.js\" -r mock-local-storage -r jsdom-global/register -r ./mocha-test-setup.js", 15 "test-ci": "mocha \"./{,!(node_modules)/**}/*.test.js\" -r mock-local-storage -r jsdom-global/register -r ./mocha-test-setup.js --reporter json" 16 }, 17 "dependencies": { 18 "@babel/core": "^7.8.7", 19 "@babel/plugin-proposal-class-properties": "7.10.4", 20 "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", 21 "@babel/plugin-proposal-optional-chaining": "^7.8.3", 22 "@babel/register": "^7.8.6", 23 "babel-plugin-transform-amd-to-commonjs": "1.4.0", 24 "devtools-modules": "0.0.37", 25 "devtools-services": "^0.0.3", 26 "enzyme": "^3.3.0", 27 "enzyme-adapter-react-16": "^1.1.1", 28 "expect": "^1.16.0", 29 "jsdom": "^9.4.1", 30 "jsdom-global": "^2.0.0", 31 "mocha": "^5.0.1", 32 "mock-local-storage": "^1.0.5", 33 "require-hacker": "^2.1.4", 34 "sinon": "^1.17.5" 35 } 36}