-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '19' of github.com:/reasonml/reason-react into replace-t…
…esting-libraries * '19' of github.com:/reasonml/reason-react: Add deprecations on ReactDOMTestUtils Add uri comment back on action Update src/React.re Update src/React.re Update src/React.re Snapshot with lower {}
- Loading branch information
Showing
6 changed files
with
198 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,145 @@ | ||
let act: (unit => unit) => unit; | ||
let act: [@deprecated "use React.act instead"] ((unit => unit) => unit); | ||
|
||
let actAsync: (unit => Js.Promise.t('a)) => Js.Promise.t(unit); | ||
let actAsync: | ||
[@deprecated "use React.actAsync instead"] ( | ||
(unit => Js.Promise.t('a)) => Js.Promise.t(unit) | ||
); | ||
|
||
[@mel.module "react-dom/test-utils"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
external isElement: 'element => bool = "isElement"; | ||
|
||
[@mel.module "react-dom/test-utils"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
external isElementOfType: ('element, React.component('props)) => bool = | ||
"isElementOfType"; | ||
|
||
[@mel.module "react-dom/test-utils"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
external isDOMComponent: 'element => bool = "isDOMComponent"; | ||
|
||
[@mel.module "react-dom/test-utils"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
external isCompositeComponent: 'element => bool = "isCompositeComponent"; | ||
|
||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
external isCompositeComponentWithType: | ||
('element, React.component('props)) => bool = | ||
"isCompositeComponentWithType"; | ||
|
||
module Simulate: { | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external click: Dom.element => unit = "click"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external clickWithEvent: (Dom.element, 'event) => unit = "click"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external change: Dom.element => unit = "change"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external blur: Dom.element => unit = "blur"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external changeWithEvent: (Dom.element, 'event) => unit = "change"; | ||
let changeWithValue: (Dom.element, string) => unit; | ||
let changeWithChecked: (Dom.element, bool) => unit; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external canPlay: Dom.element => unit = "canPlay"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external timeUpdate: Dom.element => unit = "timeUpdate"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external ended: Dom.element => unit = "ended"; | ||
[@mel.module "react-dom/test-utils"] [@mel.scope "Simulate"] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
[@mel.module "react-dom/test-utils"] | ||
[@mel.scope "Simulate"] | ||
external focus: Dom.element => unit = "focus"; | ||
}; | ||
|
||
module DOM: { | ||
[@mel.return nullable] [@mel.get] | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-webapi instead." | ||
] | ||
[@mel.return nullable] | ||
[@mel.get] | ||
external value: Dom.element => option(string) = "value"; | ||
|
||
let findBySelector: (Dom.element, string) => option(Dom.element); | ||
let findByAllSelector: (Dom.element, string) => array(Dom.element); | ||
let findBySelector: | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-webapi instead." | ||
] ( | ||
(Dom.element, string) => option(Dom.element) | ||
); | ||
let findByAllSelector: | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-webapi instead." | ||
] ( | ||
(Dom.element, string) => array(Dom.element) | ||
); | ||
let findBySelectorAndTextContent: | ||
(Dom.element, string, string) => option(Dom.element); | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-webapi instead." | ||
] ( | ||
(Dom.element, string, string) => option(Dom.element) | ||
); | ||
let findBySelectorAndPartialTextContent: | ||
(Dom.element, string, string) => option(Dom.element); | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-webapi instead." | ||
] ( | ||
(Dom.element, string, string) => option(Dom.element) | ||
); | ||
}; | ||
|
||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
let prepareContainer: (Stdlib.ref(option(Dom.element)), unit) => unit; | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
let cleanupContainer: (Stdlib.ref(option(Dom.element)), unit) => unit; | ||
[@deprecated | ||
"ReactDOMTestUtils is deprecated, and will be removed in next version. Please use melange-testing-library instead." | ||
] | ||
let getContainer: Stdlib.ref(option(Dom.element)) => Dom.element; |
Oops, something went wrong.