Skip to content

test(quantic): document suggestion jest tests #5146

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

Merged
merged 4 commits into from
Apr 15, 2025
Merged

Conversation

mikegron
Copy link
Contributor

@mikegron mikegron commented Apr 8, 2025

SFINT-5793

Created Jest tests for Document suggestion component. Had some troubles testing some things but should be good now lol

Some things maybe different as I was trying to follow jest docs:

  • Package mocks before imports so you have a clean mock using jest.mocked, instead of the prepareHeadlessState and mockSuccessfulHeadlessInitialization
  • Tested all parameters, actions dispatched, rendering etc.

I didn't really like the formatting but I hope you have suggestions! For instance, the global.CoveoHeadlessCaseAssist mock could probably be a utility.
image

@mikegron mikegron self-assigned this Apr 8, 2025
@mikegron mikegron requested a review from a team as a code owner April 8, 2025 18:36
Copy link

github-actions bot commented Apr 8, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 248.6 248.6 0
commerce 361 361 0
search 419.6 419.6 0
insight 410.8 410.8 0
recommendation 259.5 259.5 0
ssr 413.4 413.4 0
ssr-commerce 377.5 377.5 0

Copy link
Contributor

@mmitiche mmitiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice tests!
looks good to me after addressing the issue of the polluting logs!

Copy link
Contributor

@SimonMilord SimonMilord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mikegron mikegron added this pull request to the merge queue Apr 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 14, 2025
@mikegron mikegron added this pull request to the merge queue Apr 15, 2025
Merged via the queue into master with commit da8cb20 Apr 15, 2025
103 checks passed
@mikegron mikegron deleted the feat/sfint-5793 branch April 15, 2025 14:09
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.

3 participants