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 matchestestPathIgnorePatterns: ./build/,
./node_modules/,
./documentation/,
./coverage/ - 0 matchesPattern: "" - 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/**
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`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.