Problems running tests

Good evening,

When running the command “pnpm run test:api” i had a whole lot of my tests fail. At first, i thought it might have been from some alterations i had done to contribute, however, after careful analises i realized the tests were from a completely different area which i had not changed, and to make it even more interesting, when i tried to create a new repository with an untouched code, before making any changes the same tests were failing and they all fail in the same way with the same warning " ReferenceError: fastifyTestInstance is not defined". Anyone else had this problem and knows a way to fix it?

Thank you in advance for your time!

Hello there,

The api/ is not production code yet - it is not used anywhere. So, before we tackle what is going wrong, are you actually wanting to run those tests? Or, are you wanting to run the tests on the api-server/ (pnpm run test-server)?

Maybe i did get it wrong then, im trying to run tests that test the logic of sending confirmation emails and what the app shows you as warnings to see if i broke anything, are those the tests i want to run then? Thank you for the answer by the way!

Do you have more context for this?

As far as I am aware, there are no tests specifically for the emails. There are some e2e tests we have that check clicking the “change email” button renders and changes correctly when an email is changed. It does not check if any emails were sent, though.

To run the e2e tests: npx playwright test

I think this is exactly what i was looking for! Thank you!