Skip to content

test: adjust mocks #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nulfrost
Copy link

@nulfrost nulfrost commented Jul 20, 2025

Description

This PR was supposed to be small but there were some related things that also needed to get fixed including:

  • Fixing the mocks for getModerationServicesConfig referenced here adjust tests that are supposed to be mocked #19
  • Updating the docker compose file so tests can be run on the host and hit the containerized backend
  • Update the pre-commit hook to run the proper test command depending on how the backend is being run (either dockerized or not)
  • Fix mocks logs.routes.test.ts so that the tests pass

The mocks are partially fixed I think, though I think there should be a general once over for the integration tests or just the testing strategy in general. For the integration tests I think we should mock less/hit the actual backend instead of mocking some stuff out. Could be that we just need more seed data to properly test different scenarios but I'm not super knowledgeable on proper testing strategy for backend systems so I need to read up.

The outcome of this PR did fix the issue in #19 though so we should be good.

Related Issues

Resolves #19

Changes Made

  • Feature Implementation
  • Bug Fix
  • Refactor
  • Documentation Update
  • Dependency Update

How to Test

  • run backed with docker docker compose up -d
  • run npm run test:docker

tests should pass

Checklist

Before submitting your PR, ensure you’ve completed the following:

  • Followed the Contributing Guidelines.
  • Run npm run lint and resolved any warnings/errors.
  • Verified functionality across major browsers and devices.
  • Added or updated tests to cover the changes.
  • Updated documentation, if necessary.

@nulfrost nulfrost changed the title Test/adjust mocks test: adjust mocks Jul 20, 2025
@nulfrost nulfrost marked this pull request as ready for review July 21, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adjust tests that are supposed to be mocked
1 participant