Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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/,
./node_modules/,
./documentation/,
./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?

 

pipelines:
default:
- step:
name: Build Application
caches:
- node
script:
- npm install
- npm test
- npm run build
artifacts:
- 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
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

525 views 6 4
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