Skip to content

test(Overlay): add spy for console.log() from stories - #2515

Merged
joshblack merged 2 commits into
mainfrom
test/update-overlay-test
Nov 2, 2022
Merged

test(Overlay): add spy for console.log() from stories#2515
joshblack merged 2 commits into
mainfrom
test/update-overlay-test

Conversation

@joshblack

Copy link
Copy Markdown
Member

Update the Overlay tests to no longer emit console.log() from the stories. This approach uses jest.spyOn plus mockImplementation to prevent console.log() from preventing into the tests.

Since console.log() may be used for other parts of the test, it also has a guard in case console.log() is called with something other than what was expected from the story

Changelog

New

Changed

  • Add a spy for console.log() to avoid logging in tests

Removed

  • Removed expect.extend(toHaveNoViolations) as it should be automatically loaded in the environment

@joshblackjoshblack added the skip changeset This change does not need a changelog label Nov 1, 2022
@joshblack
joshblack requested review from a team and josepmartinsNovember 1, 2022 21:11
@changeset-bot

changeset-botBot commented Nov 1, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e8508b7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js78.82 KB (0%)
dist/browser.umd.js79.47 KB (0%)

@joshblack
joshblack temporarily deployed to github-pages November 1, 2022 21:18 Inactive

@josepmartinsjosepmartins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@joshblack
joshblack enabled auto-merge (squash) November 2, 2022 15:06
@joshblack
joshblack temporarily deployed to github-pages November 2, 2022 15:12 Inactive
@joshblack
joshblack merged commit 40e7aad into mainNov 2, 2022
@joshblack
joshblack deleted the test/update-overlay-test branch November 2, 2022 15:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changesetThis change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@joshblack@josepmartins