react-query-test
An expressive testing library for React:
;; const Counter = { const counter setCounter = ; const increment = ; return <div onClick=increment>counter</div>;}; ;
The interface is a subset of jQuery, where you can navigate the DOM once it has been created:
const Counter = { const counter setCounter = ; const increment = ; return <div><button onClick=increment>counter</button></div>;}; ;
For .click()
, you can pass a selector and/or a running time:
.click('button')
(string): the child element that receives the click. Leave it empty to click the current element. This is a shorthand of.find(selector).click()
for convenience..click(100)
(number): the time to wait after the click for the effect to be settled. If they are not immediate (API call, timeouts, transitions, etc) make sure that the time is longer than the effect. Internally this will wrap the effect with an act() that works for the specified time.
You can combine them as well:
;
API
Unknown: .size()
, .value()
, .checked