Skip to content
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

Update jest-cli to 29.7.0 #1094

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshuarrrr
Copy link
Member

Description

  1. Bump jest and related dependencies to latest major version
  2. Update jsdom
  3. Update snapshots
  4. Skip some focus-related test cases which don't work well in Enzyme/Jsdom

Issues Resolved

Fixes #630

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -117,7 +117,7 @@ describe('OuiCodeEditor', () => {
expect(blurSpy).toHaveBeenCalled();
});

test('pressing escape in ace textbox will enable overlay', () => {
test.skip('pressing escape in ace textbox will enable overlay', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make a followup issue if we decide to merge this without unskipping these


jest.spyOn(colorPickerAnchor, 'focus');

expect(colorPickerAnchor.focus).not.toHaveBeenCalled();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we check if it hasn't been called before doing anything?

thumbs.first().simulate('keydown', {
key: keys.ARROW_DOWN,
});
expect(thumbs.at(1).getDOMNode()).toEqual(document.activeElement);

expect(thumbs0.focus).toHaveBeenCalledTimes(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to reset call count before the key down?

@@ -580,16 +580,16 @@ describe('OuiDataGrid', () => {
return props;
})
).toMatchInlineSnapshot(`
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make a good first issue to remove inline snapshots

});

it('should not call fn immediately', async () => {
const instance = new AsyncInterval(spy, 1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to do this in each test instead of in the beforeEach?

@@ -58,7 +58,8 @@ describe('OuiErrorBoundary', () => {

test('is rendered with an error', () => {
// Prevent the React boundary error from appearing in the terminal.
spyOn(console, 'error'); // eslint-disable-line no-undef
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we change this?

@@ -25,7 +25,6 @@ exports[`OuiToolTip shows tooltip on focus 1`] = `
class="ouiToolTipAnchor"
>
<button
aria-describedby="id"
Copy link
Contributor

Choose a reason for hiding this comment

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

It makes sense that this was deleted, but why?

@joshuarrrr
Copy link
Member Author

Setting to draft in favor of #1102

@joshuarrrr joshuarrrr marked this pull request as draft October 17, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5)
2 participants