Lint tests

This commit is contained in:
Michael Vines 2018-08-23 11:00:36 -07:00
parent 96f8a8620d
commit 79ab826678
3 changed files with 11 additions and 5 deletions

View File

@ -35,11 +35,10 @@
"codecov": "npm run test:cover && cat ./coverage/lcov.info | codecov", "codecov": "npm run test:cover && cat ./coverage/lcov.info | codecov",
"flow": "flow", "flow": "flow",
"flow-typed": "npm run clean && flow-typed install --overwrite || true", "flow-typed": "npm run clean && flow-typed install --overwrite || true",
"lint": "eslint src examples", "lint": "eslint src test examples",
"prepublish": "npm run clean && npm run test && npm run flow && npm run lint && npm run doc && npm run build" "prepublish": "npm run clean && npm run test && npm run flow && npm run lint && npm run doc && npm run build"
}, },
"dependencies": { "dependencies": {},
},
"devDependencies": { "devDependencies": {
"babel-core": "6.26.0", "babel-core": "6.26.0",
"babel-eslint": "8.2.3", "babel-eslint": "8.2.3",
@ -60,6 +59,7 @@
"esdoc-standard-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0",
"eslint": "4.19.1", "eslint": "4.19.1",
"eslint-plugin-import": "2.11.0", "eslint-plugin-import": "2.11.0",
"eslint-plugin-jest": "^21.21.0",
"eslint-plugin-jsx-a11y": "^6.1.1", "eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.11.1", "eslint-plugin-react": "^7.11.1",
"flow-bin": "0.70.0", "flow-bin": "0.70.0",

View File

@ -0,0 +1,6 @@
module.exports = { // eslint-disable-line import/no-commonjs
'extends': [
"plugin:jest/recommended",
"../.eslintrc.js",
]
};

View File

@ -3,8 +3,8 @@ import {Account} from '../src/account';
test('generate new account', () => { test('generate new account', () => {
const account = new Account(); const account = new Account();
const len = account.publicKey.length; expect(account.publicKey.length).toBeGreaterThanOrEqual(43);
expect(len === 43 || len === 44); expect(account.publicKey.length).toBeLessThanOrEqual(44);
expect(account.secretKey).toHaveLength(64); expect(account.secretKey).toHaveLength(64);
}); });