Coverage: jest.mock
This commit is contained in:
parent
2fce638bf2
commit
a557640228
|
@ -17,6 +17,7 @@ console.log(dummy());
|
|||
|
||||
# TODO
|
||||
- dotenv
|
||||
- https://github.com/vadimdemedes/ink
|
||||
- bundlesize
|
||||
- Prepack
|
||||
- https://greenkeeper.io/
|
20
package.json
20
package.json
|
@ -9,22 +9,26 @@
|
|||
"prebuild": "npm run eslint",
|
||||
"build": "babel src -d build",
|
||||
"test": "jest --config .jest.json",
|
||||
"test:ci": "jest --config .jest.ci.json",
|
||||
"test:watch": "npm test -- --watch",
|
||||
"test:coverage": "npm test -- --coverage",
|
||||
"test:coverage:ci": "npm run test:coverage && codecov -t $CODECOV_TOKEN",
|
||||
"prepublish": "npm run build",
|
||||
"release": "np",
|
||||
"example:peripheral:install": "cd example/peripheral && npm install",
|
||||
"example:peripheral:build": "cd example/peripheral && npm run build",
|
||||
"example:peripheral:start": "cd example/peripheral && npm start",
|
||||
"example:webapp:install": "cd example/webapp && npm install",
|
||||
"example:webapp:build": "cd example/webapp && npm run build",
|
||||
"example:webapp:deploy": "cd example/webapp && npm run deploy",
|
||||
|
||||
"preexample:install": "npm run example:peripheral:install",
|
||||
"example:install": "npm run example:webapp:install",
|
||||
"example:start": "npm run example:peripheral:start",
|
||||
"example:deploy": "npm run example:webapp:deploy",
|
||||
|
||||
"example:webapp:install": "cd example/webapp && npm install",
|
||||
"example:webapp:build": "cd example/webapp && npm run build",
|
||||
"example:webapp:deploy": "cd example/webapp && npm run deploy",
|
||||
|
||||
"example:peripheral:install": "cd example/peripheral && npm install",
|
||||
"example:peripheral:build": "cd example/peripheral && npm run build",
|
||||
"example:peripheral:start": "cd example/peripheral && npm start",
|
||||
|
||||
"test:ci": "jest --config .jest.ci.json",
|
||||
"test:coverage:ci": "npm run test:coverage && codecov -t $CODECOV_TOKEN",
|
||||
"preexample:ci": "npm run example:webapp:install",
|
||||
"example:ci": "npm run example:webapp:build"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* global jest, test, expect */
|
||||
import actions from '.';
|
||||
|
||||
jest.mock('../central', () => null);
|
||||
|
||||
test('actions', () => {
|
||||
expect(Object.keys(actions)).toEqual([
|
||||
'connectStore',
|
||||
'syncStore',
|
||||
'syncState',
|
||||
'sendAction',
|
||||
]);
|
||||
});
|
Loading…
Reference in New Issue