Riot-test-utils-jquery
An official jQuery extension of riot-test-utils
.
Currently, this extension is a little experimental.
Installation
Install via NPM
npm i riot-test-utils-jquery -D
Usage
Require once somewhere in your code:
;var mount = ;
Then, its extension methods are available as ordinaly ones of wrappers.
var wrapper = ;; // jQuery.is(selector)
API
You can call some APIs of jQuery as assertion helpers from RiotWrapper
andWeakWrapper
.
The list of them is below:
- is
- has
- hasClass
- attr
- css
- data
- prop
- val
and an escape hatch $()
to get jQuery object itself.
Note all of the mutaters like prop('disabled', true)
returns the wrapper itself.