yeah running npm test on the sst root gives the co...
# seed
k
yeah running npm test on the sst root gives the correct error. just got to figure out what i need to do there i guess πŸ™‚
r
Let me know when you find it, I have the same problem to fix on my todo list πŸ˜›
k
@Robert sure, so as theres 2 projects the SST project was picking up tests from the frontend project. I fixed it by adding this into the SST package.json "jest": { "testPathIgnorePatterns" : [ "frontend/" ] } I need to just check that seed.run works fine and still fires my frontend tests off though
well it did work, but it only ran the SST tests and not the frontend tests. Im going to need to look at making seed manually run the frontend tests
I added before_build: - cd frontend && npm install && npm test to my seed.yml. it does now do the test, but we loose the nice formatting. need to make an error to make sure it errors
the build actually failed later on.. need to check that too
the seed build will fail if the test fails though. now just need to make sure it succeeds in building πŸ™‚ last go for me tonight though as running out of time
yeah that all worked. i had changed some eslint settings that were throwing some TS warnings for me too. So 1. add this to your SST package.json "jest": { "testPathIgnorePatterns" : [ "frontend/" ] } 2. update your seed.yml file with before_build: - cd frontend && npm install && npm test
r
Sweet tx! πŸ™‚ Happy it got fixed
f
Just to chime in, @Kristian Lake you can try this if u don’t want failed tests to fail the build
Copy code
before_build:
  - cd frontend && npm install
  - cd frontend && npm test; echo "Test completed"