-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Get semantic-ui theme on react 17 and dts-cli #3083
Get semantic-ui theme on react 17 and dts-cli #3083
Conversation
- Updated the `package*.json` to update to react 17 and switch from `tsdx` to `dts-cli` - Updated the tests to mock the `Ref` component from `@fluentui/react-component-ref` because it causes tests to fail
…t uses a newer version of `prettier`
8b5ba6a
to
b685c47
Compare
@@ -4,6 +4,12 @@ import renderer from "react-test-renderer"; | |||
|
|||
import Form from "../src/index"; | |||
|
|||
/** Mock the `react-component-ref` component used by semantic-ui to simply render the children, otherwise tests fail */ | |||
jest.mock("@fluentui/react-component-ref", () => ({ |
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.
Should this be semantic-ui
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.
@jacqueswho Actually, it needs to be @fluentui/react-component-ref
... Looking at the semantic-ui-react source code you can see that it is what needs to be mocked
@@ -4,6 +4,12 @@ import renderer from "react-test-renderer"; | |||
|
|||
import Form from "../src/index"; | |||
|
|||
/** Mock the `react-component-ref` component used by semantic-ui to simply render the children, otherwise tests fail */ | |||
jest.mock("@fluentui/react-component-ref", () => ({ |
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.
Should this be semantic-ui
@@ -4,6 +4,12 @@ import renderer from "react-test-renderer"; | |||
|
|||
import Form from "../src/index"; | |||
|
|||
/** Mock the `react-component-ref` component used by semantic-ui to simply render the children, otherwise tests fail */ | |||
jest.mock("@fluentui/react-component-ref", () => ({ | |||
...jest.requireActual("@fluentui/react-component-ref"), |
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.
Should this be semantic-ui
@@ -4,6 +4,12 @@ import renderer from "react-test-renderer"; | |||
|
|||
import Form from "../src/index"; | |||
|
|||
/** Mock the `react-component-ref` component used by semantic-ui to simply render the children, otherwise tests fail */ | |||
jest.mock("@fluentui/react-component-ref", () => ({ |
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.
Should this be semantic-ui
Reasons for making this change
package*.json
to update to react 17 and switch fromtsdx
todts-cli
cs-format
oversemantic-ui
after upgrading todts-cli
that uses a newer version ofprettier
Ref
component from@fluentui/react-component-ref
because it causes tests to fail5.x migration guide
and theCHANGELOG.md
Checklist
npm run test:update
to update snapshots, if needed.