Browse Source

[misc] setup

0.7.0-breaking-rewrite
Muthu Kumar 6 years ago
parent
commit
a8d63ff6b7
  1. 18
      .eslintrc.js
  2. 8
      .vscode/launch.json
  3. 3
      sample/sample.test.js

18
.eslintrc.js

@ -9,22 +9,24 @@ module.exports = {
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended",
"rules": { "rules": {
"no-global-assign": "off",
"no-console": "off",
"no-undef": "off",
"no-nested-ternary": "warn", "no-nested-ternary": "warn",
"no-self-compare": "error", "no-self-compare": "error",
"no-trailing-spaces": "error", "no-trailing-spaces": "error",
"no-unmodified-loop-condition": "error", "no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error", "no-unneeded-ternary": "error",
"no-console": "off", "no-undef": "error",
"no-undef": "off",
'comma-dangle': [ 'error', 'only-multiline' ], 'comma-dangle': [ 'error', 'only-multiline' ],
"indent": [
"error",
"tab",
{ MemberExpression: 0, }
],
"linebreak-style": [ "error", "unix" ], "linebreak-style": [ "error", "unix" ],
"semi": [ "error", "always" ], "semi": [ "error", "always" ],
"eqeqeq": [ "error", "always", {"null": "ignore"} ], "eqeqeq": [ "error", "always", {"null": "ignore"} ],
"no-global-assign": 0, "indent": [ "error", "tab",
{
MemberExpression: 0,
SwitchCase: 1,
}
],
} }
}; };

8
.vscode/launch.json

@ -7,8 +7,12 @@
{ {
"type": "node", "type": "node",
"request": "launch", "request": "launch",
"name": "Launch Program", "name": "Debug Gunner",
"program": "${workspaceFolder}/sample/sample.test.js" "program": "${workspaceFolder}/sample/sample.test.js",
"args": [
"--log",
"--trace",
],
} }
] ]
} }

3
sample/sample.test.js

@ -45,6 +45,9 @@ gunner.test('file must have hello as content', async expect => {
]; ];
}); });
gunner.test('(should fail) Should automatically fail', expect =>
expect().fail());
gunner.test('(should fail) Value is not a Promise', expect => gunner.test('(should fail) Value is not a Promise', expect =>
expect(5).isPromise()); expect(5).isPromise());

Loading…
Cancel
Save