Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

"No tests found" however it has 118 matches

No tests found
In /opt/atlassian/pipelines/agent/build
305 files checked.
testMatch: /opt/atlassian/pipelines/agent/build/src/**/__tests__/**/*.{js,jsx,mjs},
/opt/atlassian/pipelines/agent/build/src/**/?(*.)(spec|test).{js,jsx,mjs} - 118 matches
testPathIgnorePatterns: ./build/,
./coverage/ - 0 matches
Pattern: "" - 0 matches
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
All files | 0 | 0 | 0 | 0 | |

 I don't know what I'm doing wrong here, in my pipeline I'm running the same commands as locally yet bitbucket doesn't run the tests. I'm using Jest for my tests, it looks like Bitbucket is trying to run my tests from within the `build` directory but that doesn't make sense. Why would I save my test files inside of my build directory?


- step:
name: Build Application
- node
- npm install
- npm test
- npm run build
- build/**


1 answer

1 vote

Hey @Matt Haff,

the build directory that is being searched is the name of the directory in which the initial clone of your repository happened. From the looks of it, you have another `build` directory within that one. 

Could you maybe try removing the `build` directory from your test exclusion list? 

This was the problem I had. I was excluding `/build/` which matched the name of the path the pipeline cloned to `/opt/atlassian/pipelines/agent/build`

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

218 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you