WebdriverIO_Typescript icon indicating copy to clipboard operation
WebdriverIO_Typescript copied to clipboard

On failed expect, npm exits with error

Open daveabes opened this issue 8 years ago • 0 comments

When running your boilerplate, if I set the expect function to a failed condition, when this is reached while and mocha continue as expected until the end execution, the npm script crashes at the end, preventing any additional scripts being executed.

Here is at attached code block: ` 08:37:36] DATA {"using":"id","value":"flash"} [08:37:36] RESULT {"ELEMENT":":wdc:1513233456279"} [08:37:36] COMMAND GET "/wd/hub/session/42cae220-e099-11e7-b72b-7b9ec7b17085/element/:wdc:1513233456279/text" [08:37:36] DATA {} [08:37:36] RESULT "You logged into a secure area!\n×" ․[08:37:36] COMMAND DELETE "/wd/hub/session/42cae220-e099-11e7-b72b-7b9ec7b17085" [08:37:36] DATA {} [08:37:36] RESULT {}

1 passing (9.80s) 1 failing

  1. login form should deny access with wrong creds: expected 'Your username is invalid!\n×' to include 'Ozora 2017!' running phantomjs AssertionError: expected 'Your username is invalid!\n×' to include 'Ozora 2017!' at Context.it (/Users/davidabes/Downloads/WebdriverIO_Typescript-master/src/specs/login.spec.js:11:57) at Promise () at F (/Users/davidabes/Downloads/WebdriverIO_Typescript-master/node_modules/core-js/library/modules/_export.js:35:28)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] test: node ./node_modules/typescript/lib/tsc.js && node ./node_modules/webdriverio/bin/wdio && node ./node_modules/rimraf/bin.js src npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/davidabes/.npm/_logs/2017-12-14T06_37_36_491Z-debug.log `

daveabes avatar Dec 14 '17 06:12 daveabes