BuckleScript bindings for dom-testing-library.
npm install bs-dom-testing-library> BuckleScript bindings for dom-testing-library.
``sh
$ yarn add --dev bs-dom-testing-library
$ npm install --save-dev bs-dom-testing-library
`
#### Add to bsconfig.json
`json`
{
"bs-dev-dependencies": [
"bs-dom-testing-library"
]
}
#### With bs-jest
`ocaml
/ Header_test.re /
open Jest;
open Expect;
open Webapi.Dom;
open Webapi.Dom.Element;
test("header exists", () => {
let div = Document.createElement("div", document);
div->setInnerHTML({|
div
|> getByText(~matcher=Str("Hello, World!"))
|> expect
|> ExpectJs.toBeTruthy;
});
``
See src/__tests__ for some examples.
`shnpm install
$ git clone https://github.com/wyze/bs-dom-testing-library.git
$ cd bs-dom-testing-library
$ yarn # or `
`sh`
$ yarn build
`sh``
$ yarn test
* Add waitForElementToBeRemoved (@wyze in #23)
* Add more ByRole options (@wyze in #22)
* Update some of the utility functions (@wyze in #21)
* Add sponsor button (@wyze in dec1dab)
* Upgrade to latest dependencies (@wyze in #20)
MIT © Neil Kistner
[circleci-image]: https://img.shields.io/circleci/project/github/wyze/bs-dom-testing-library.svg?style=flat-square
[circleci-url]: https://circleci.com/gh/wyze/bs-dom-testing-library
[npm-image]: https://img.shields.io/npm/v/bs-dom-testing-library.svg?style=flat-square
[npm-url]: https://npm.im/bs-dom-testing-library
[codecov-image]: https://img.shields.io/codecov/c/github/wyze/bs-dom-testing-library.svg?style=flat-square
[codecov-url]: https://codecov.io/github/wyze/bs-dom-testing-library