Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jest not found while running a pipeline


While trying to run a test automation suite in pipeline getting error, but the same command works locally:

script : "test-sanity": "jest webservices/specs/sanity/**/*.test.ts --maxWorkers=3 --forceExit",

+ umask 000

+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="main" --depth 50 https://x-token-auth:$$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

+ git reset --hard 23070c5744edc443f3313c3b06698d526f53e002
HEAD is now at 23070c5 edited online with Bitbucket

+ git config bitbucket-pipelines

+ git config

+ git config push.default current

+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

+ git remote set-url origin$BITBUCKET_REPO_FULL_NAME

+ git reflog expire --expire=all --all

+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude

+ chmod 777 $BUILD_DIR

Images used:
build :
+ npm test

> nc-testing@1.0.0 test
> jest webservices/specs/sanity/**/*.test.ts --group=$GROUP --maxWorkers=2 --forceExit

/tmp/ 1: /tmp/ jest: not found
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

1 answer

Issue resolved, need to pass the node_modules as artifacts

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events