Skip to content

Conversation

@kathyavini
Copy link
Collaborator

@kathyavini kathyavini commented May 27, 2025

Description

After the last merge, this old import line in mock.factories.js file crashed the backend container as follows:

Screenshot 2025-05-27 at 9 05 50 AM

In PR #3755 there is a mocking function residing in a file which imports the file above. This mocking function is used in a service file that is called by a controller. This chain is the first time that mock.factories.js has been called from the actual server.js and not just by the jest testing environment (presumably more forgiving about imports), causing this crash.

This PR adds the extension to fix the crash, but @Duncan-Brain will be opening a PR to also fix the import chain to avoid importing from /tests entirely 🙏 Right now we don't exclude /tests from the backend docker container but that's more on oversight than anything else; ideally all server-called code should reside in /src and only that should be part of the production container.

Jira link: None

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Did not test; please merge to test on beta.

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

@kathyavini kathyavini self-assigned this May 27, 2025
@kathyavini kathyavini requested review from a team as code owners May 27, 2025 16:46
@kathyavini kathyavini added the bug Something isn't working label May 27, 2025
@kathyavini kathyavini requested review from Duncan-Brain and antsgar and removed request for a team May 27, 2025 16:46
@Duncan-Brain
Copy link
Collaborator

Heres the other pr: #3784

@kathyavini kathyavini added this pull request to the merge queue May 27, 2025
Merged via the queue into integration with commit ee6c82b May 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants