From a8d63ff6b7323428ca3d7996ff3d14915f2f0b3f Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Fri, 24 Aug 2018 12:17:34 +0530 Subject: [PATCH] [misc] setup --- .eslintrc.js | 18 ++++++++++-------- .vscode/launch.json | 8 ++++++-- sample/sample.test.js | 3 +++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index acb8edf..bfff82f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,22 +9,24 @@ module.exports = { }, "extends": "eslint:recommended", "rules": { + "no-global-assign": "off", + "no-console": "off", + "no-undef": "off", "no-nested-ternary": "warn", "no-self-compare": "error", "no-trailing-spaces": "error", "no-unmodified-loop-condition": "error", "no-unneeded-ternary": "error", - "no-console": "off", - "no-undef": "off", + "no-undef": "error", 'comma-dangle': [ 'error', 'only-multiline' ], - "indent": [ - "error", - "tab", - { MemberExpression: 0, } - ], "linebreak-style": [ "error", "unix" ], "semi": [ "error", "always" ], "eqeqeq": [ "error", "always", {"null": "ignore"} ], - "no-global-assign": 0, + "indent": [ "error", "tab", + { + MemberExpression: 0, + SwitchCase: 1, + } + ], } }; diff --git a/.vscode/launch.json b/.vscode/launch.json index ca312ed..004e6d3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,8 +7,12 @@ { "type": "node", "request": "launch", - "name": "Launch Program", - "program": "${workspaceFolder}/sample/sample.test.js" + "name": "Debug Gunner", + "program": "${workspaceFolder}/sample/sample.test.js", + "args": [ + "--log", + "--trace", + ], } ] } \ No newline at end of file diff --git a/sample/sample.test.js b/sample/sample.test.js index 9d83ef2..cace0b0 100644 --- a/sample/sample.test.js +++ b/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 => expect(5).isPromise());