-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: make aria test utils helpers work with vitest-browser-react #9756
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
Changes from 2 commits
c15556b
283c898
bce2362
01f1116
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * Copyright 2025 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| import * as React from 'react'; | ||
| import * as ReactDOMTestUtils from 'react-dom/test-utils'; | ||
|
|
||
| let actImpl: typeof ReactDOMTestUtils.act; | ||
| if (typeof React.act === 'function') { | ||
| actImpl = React.act; | ||
| } else { | ||
| actImpl = ReactDOMTestUtils.act; | ||
| } | ||
|
|
||
| export const act = actImpl; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ | |
| "@swc/helpers": "^0.5.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "@testing-library/dom": "^10.1.0", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i imagine this one and the one above resulted in a lot of warnings when you run yarn install now about peers not being met?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah it was the contraints linter that prompted this
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm i'm not sure why RAC's package.json isn't complaining about not having it as well, but I think maybe that'll just happen when we finally update yarn |
||
| "@testing-library/react": "^16.0.0", | ||
| "@testing-library/user-event": "^14.0.0", | ||
| "jest": "^29.5.0", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of technically a breaking change, people will get installation errors and depending on their peer dependency setup, the new dependency may not install automatically
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I guess I'll keep both for now, will remove the
/reactone when we bump to full release