@drewschrauf/bs-user-event

0.1.1 • Public • Published

@drewschrauf/bs-user-event

@testing-library/user-event Reason/BuckleScript bindings.

Installation

Install as a dev dependency:

npm install --save-dev @drewschrauf/bs-user-event

Add it to your bsconfig.json as a dev dependency.

{
  ...
  "bs-dev-dependencies": [
    ...
    "@drewschrauf/bs-user-event"
  ]
}

API

This documentation covers the specifics of these bindings. To learn about the principles and approach behind Testing Library, refer to the official documentation.

All methods from @testing-library/user-event are implemented. Generally you'd pipe an element into the event function like below.

el |> UserEvent.click

If the event can take an argument, pass positional and named optional arguments like below:

el |> UserEvent.type_("text", ~delay=1000)

Methods that can take multiple argument types have been split into multiple assertions. For example, selectOption and selectOptions take a string and list(string) respectively. Refer to the interface file for a full list of events.

Package Sidebar

Install

npm i @drewschrauf/bs-user-event

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

5.61 kB

Total Files

6

Last publish

Collaborators

  • drewschrauf