Exit code is 0 instead of 1 when jest tests failed
Will956 opened this issue ยท 1 comments
Will956 commented
Hey ๐
We aim to use that SDK in order to run our jest tests on Browserstack, we run tests thanks to that command:
"scripts": {
"test": "browserstack-node-sdk jest tests/index.test.js"
},
When running, the exit code is always 0 (because the last command came from browserstack-node-sdk and not jest) even if the jest tests fail. This is problematic within our CI because the job will always be green, our CI is configurated as follow:
version: 2.1
orbs:
node: circleci/node@5.0.2
jobs:
test-old-browsers:
executor: node/default
steps:
- checkout
- node/install-packages:
with-cache: true
- run: echo "export BROWSERSTACK_BUILD_NAME=$CIRCLE_BRANCH-$(date +%Y-%m-%d-%H:%M)" >> $BASH_ENV
- run:
command: npm run test
name: Run old browsers tests
workflows:
test-old-browsers-workflow:
jobs:
- test-old-browsers
I tried to use set -e but looks like it doesn't work ๐ค
Do you have any clues about that ? Thanks ๐
Will956 commented
Hi @karanshah-browserstack ๐ Sorry for the random ping, but can you help me with that one?