ageddesi/Mocked-API

Errors in API endpoint tests triggering false tests failures

devvspaces opened this issue · 1 comments

Describe the bug
Found serious bug issue concerning the way api endpoint tests are being run. This issue seriously affects the GitHub actions, it's causing most api tests to fail. Other tests are failing because of error TS2304: Cannot find name 'baseURL'

To Reproduce
Steps to reproduce the behavior:

  1. clone repo
  2. npm install
  3. npm test

Expected behavior
You should see most tests with errors like this connect ECONNREFUSED 127.0.0.1:3000 or something similar. You should also see other tests with error TS2304: Cannot find name 'baseURL'. The problems affecting both kinds of errors are similar.

Screenshots
First image from Github Actions in Repo
image

From my cmd
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: Version 106.0.5249.103 (Official Build) (64-bit)

Smartphone (please complete the following information):
I use laptop

Additional context
I already have a way to solve this, tested it already on local system. I would create a pull request for it, changes should show immediately on GitHub Actions fresh logs.

I would like to be assign this @ageddesi