Skip to content

test(MarkdownEditor): clean up tests that emit console.error - #2560

Merged
joshblack merged 2 commits into
mainfrom
test/update-markdown-editor-tests
Nov 15, 2022
Merged

test(MarkdownEditor): clean up tests that emit console.error#2560
joshblack merged 2 commits into
mainfrom
test/update-markdown-editor-tests

Conversation

@joshblack

Copy link
Copy Markdown
Member

Background: #2461

This PR updates MarkdownEditor tests that emit console.error(). Generally, these fell along the lines of addressing one of the following errors:

 ● Console
console.error
Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one.
at printWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom-test-utils.development.js:43:5)
at onDone (node_modules/react-dom/cjs/react-dom-test-utils.development.js:1034:9)
at node_modules/react-dom/cjs/react-dom-test-utils.development.js:1073:13
console.error
Error: Not implemented: navigation (except hash changes)
at module.exports (/Users/joshblack/gh/primer/react/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
at navigateFetch (/Users/joshblack/gh/primer/react/node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
at exports.navigate (/Users/joshblack/gh/primer/react/node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
at Timeout._onTimeout (/Users/joshblack/gh/primer/react/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js:81:7)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
type: 'not implemented'
}
at VirtualConsole.<anonymous> (node_modules/jest-environment-jsdom/build/index.js:60:23)
at module.exports (node_modules/jsdom/lib/jsdom/browser/not-implemented.js:12:26)
at navigateFetch (node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
at exports.navigate (node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
at Timeout._onTimeout (node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js:81:7)

Often, the act() related violations were due to a Promise that had not resolved in an act().

@joshblack
joshblack requested review from a team and siddharthkpNovember 9, 2022 22:16
@changeset-bot

changeset-botBot commented Nov 9, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b9c1399

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 9, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js78.9 KB (0%)
dist/browser.umd.js79.54 KB (0%)

@joshblack
joshblack temporarily deployed to github-pages November 9, 2022 22:22 Inactive
@joshblackjoshblack added the skip changeset This change does not need a changelog label Nov 10, 2022
@joshblack

joshblack commented Nov 14, 2022

Copy link
Copy Markdown
MemberAuthor

@siddharthkp quick bump when you get the chance to review!

@siddharthkpsiddharthkp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@joshblackjoshblack changed the title test(MarkdownEditor): clean up tests that emitted console.errortest(MarkdownEditor): clean up tests that emit console.errorNov 15, 2022
@joshblack
joshblack enabled auto-merge (squash) November 15, 2022 16:54
@joshblack
joshblack merged commit 6522459 into mainNov 15, 2022
@joshblack
joshblack deleted the test/update-markdown-editor-tests branch November 15, 2022 17:00
@joshblack
joshblack temporarily deployed to github-pages November 15, 2022 17:01 Inactive
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@siddharthkp