{"_id":"@drewschrauf/bs-dom-testing-library","_rev":"2-068449a12d84293112dbfe5cdb2958b3","name":"@drewschrauf/bs-dom-testing-library","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.2":{"name":"@drewschrauf/bs-dom-testing-library","version":"0.1.2","license":"MIT","scripts":{"build":"bsb -clean-world -make-world","watch":"bsb -make-world -w","pretest":"yarn build","test":"jest"},"keywords":["reason","bucklescript","jest","react"],"dependencies":{"@testing-library/dom":"^7.2.2"},"devDependencies":{"@glennsl/bs-jest":"^0.5.1","bs-platform":"^7.2.2"},"publishConfig":{"access":"public"},"gitHead":"84f04e744056481b5bcda3088ee270c36c5e1162","description":"[@testing-library/dom-testing-library](https://github.com/testing-library/dom-testing-library) Reason/BuckleScript bindings.","_id":"@drewschrauf/bs-dom-testing-library@0.1.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.20.2/node@v12.13.1+x64 (linux)","_npmUser":{"name":"drewschrauf","email":"andrew.schrauf@gmail.com"},"dist":{"integrity":"sha512-kNk/n60JEjtaU8oMNZQBacijRxACexnGgc6D97j0RTW+Ax41ly7/Nae4LetlobYFG/71q6iE54o59NlXdSY7wA==","shasum":"742e292815b0a47591c675ac7ea6c655fb9b25e6","tarball":"https://registry.npmjs.org/@drewschrauf/bs-dom-testing-library/-/bs-dom-testing-library-0.1.2.tgz","fileCount":30,"unpackedSize":97531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJernPYCRA9TVsSAnZWagAA5AEQAKK5IB1/3DVUeyKwk5fC\nt9vSSpiH6Bl+4bxM8fIIJ1sVLXcN0KH03VREl+nRzq5xnhUx1jIpCMu6O8Px\nC19ysRPFEUlltKzyFYZhWnxTHhmx/R14BDZZgBSv7CFatKFL14ON7wkCtpwm\nUExVr9mN6A/gqGvFVWP9mRolLPSx0uUMythELRIzf1GNVHqBRG3bjeeXf/H5\ntHiviBPJDXi9YkrQ7anvWqdKC//MIIX0c3Uw3lX3DPp9qDbultlqAa/oedqJ\n82Bk45ejqYF82zMfBdwFiCvl/hj0noR+w2OirMJONnSe1AAo/aIKzmSsddLA\nFWY7dmdAkkKgcp4flAvPzbjwz/xzW9BvhVBp6YyBUIXGppsvHRgj76yZOcF8\nkn0+dFAiTYSfCa0h9MWHanLZILWGBI/ZRGXih/nLES8TzbyyEwki2b3Tz1Ej\n/FVGHDvJbAzhZhU9BduRX/dtz7mANQizVyBjd9GfkOiLC+VF7iacD4wjtwIF\nVsn8JhDXTaBjrfKY1gqIDQdKqLFr4ZfSE6xhh+A+Q3NKfhvdEOw2DSU9IgOs\nj80SCC2nagXWZyEUhXTGRTpIbW6YOal5kG9HBPcevyYQNyRyBC4OwqSbeu7P\n4TeKa6jRmKcKl4TFITTZii1j42A2llLoRicS2zRpWBP2NaMDPkGruMGu+QK6\nkSGP\r\n=ed+c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFz/1qduaataN1otGvkdTnIGTt9xYU4zOE/lX4Bfvd7TAiEA+yXoLkYHZCmvhHsWp9xBcc71nQzNxWpdcxBjtMXYc2w="}]},"maintainers":[{"name":"drewschrauf","email":"andrew.schrauf@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bs-dom-testing-library_0.1.2_1588491224206_0.8612155884569763"},"_hasShrinkwrap":false},"0.1.3":{"name":"@drewschrauf/bs-dom-testing-library","version":"0.1.3","license":"MIT","scripts":{"build":"bsb -make-world","pretest":"yarn build","test":"jest"},"keywords":["reason","bucklescript","jest","react"],"dependencies":{"@testing-library/dom":"^7.2.2"},"devDependencies":{"@glennsl/bs-jest":"^0.5.1","bs-platform":"^7.2.2"},"publishConfig":{"access":"public"},"gitHead":"6d29a951a5e439eab42585a1e2fa51fd903c7be6","description":"[@testing-library/dom-testing-library](https://github.com/testing-library/dom-testing-library) Reason/BuckleScript bindings.","_id":"@drewschrauf/bs-dom-testing-library@0.1.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.20.2/node@v12.13.1+x64 (linux)","_npmUser":{"name":"drewschrauf","email":"andrew.schrauf@gmail.com"},"dist":{"integrity":"sha512-MXjubBAewB+9VhWT0EatEONeDzcUpj4dwqX5UJgmzCtMWiEBI/kPBAeTobtNg4Dyy460gNfkPI+Ip7Dbbie5Iw==","shasum":"f391ba7e51fb1755c6d1012d681df99039146134","tarball":"https://registry.npmjs.org/@drewschrauf/bs-dom-testing-library/-/bs-dom-testing-library-0.1.3.tgz","fileCount":30,"unpackedSize":97369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewlWxCRA9TVsSAnZWagAAt5YQAJNHvryFzeFtIvgJaPDp\ndnPXTpf3Xjrm6ACJTScxZJpDT/Iyc8ZFZio9lXh4kSb4q3AeDvm2lievjYOt\nJ5Yd772kN/a1E/Z4ummQhzxIOjY3Fwb1uybJwkVmslg4tztUFOjJZw2GXQT6\nk1Avig2AR+na4lJuQnOCp7SHQnm9/HrawlK9vmEq6zWcubdbzZSWeonJJAJm\nS3xrOivED8b39dBT5UVeb5a/1UNTTaFKoLFlu2EoWm3p61TgeyzeO5McwDPi\n/jy07+H8wtDu8jEiiMO+bXAdonBaRZYRE8YJtjweAECZ1tluPIvlaWuRDvBp\nOJH3JPPGHfEGXKlUwRrGWAIA0jAu4QzQlztfaADgV9AugkmhyPrSTYYPJnzi\ngJnfCvSOsEbyGkYSr+OInETiQdGKvOcLWZTTB7CLopvZHzN0A4TKxMFjwPuV\noCg24hpaL7nvi/ADYY5eieqtxfkvq3/kHBwf1rlDhrXZbN1sBa8IgTivBd0q\nYGgFMmjDlAmCEEWWF+l/MD7cIrloW69u1OL2MXfXPjgGGoB/b5AaYhm33r/p\nrKvYumNgHaWfyVxnL468cAuOwtoWpdW71tKRTfm9GxlINWG+f71V7+cdMr3d\n5epZgG/xesZl56ZSVDQcrxazkN8Fz9F/eNHbIf6kV89bG+MjYVuTOrUiIfW/\nCbAM\r\n=TyU5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlOYbtZEVJaPePvfKNOb3X9wy7eu8QTFVryfn7uWtLNwIhAPj11cY5fBUCJZx5ZXv3VUS0Q2uyLcvaSS6ONa5EFDWd"}]},"maintainers":[{"name":"drewschrauf","email":"andrew.schrauf@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bs-dom-testing-library_0.1.3_1589794225453_0.8482084120871056"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-03T07:33:44.173Z","0.1.2":"2020-05-03T07:33:44.406Z","modified":"2022-04-05T05:38:44.959Z","0.1.3":"2020-05-18T09:30:25.559Z"},"maintainers":[{"name":"drewschrauf","email":"andrew.schrauf@gmail.com"}],"description":"[@testing-library/dom-testing-library](https://github.com/testing-library/dom-testing-library) Reason/BuckleScript bindings.","keywords":["reason","bucklescript","jest","react"],"license":"MIT","readme":"# @drewschrauf/bs-dom-testing-library\n\n[@testing-library/dom-testing-library](https://github.com/testing-library/dom-testing-library) Reason/BuckleScript bindings.\n\nTake a look at some usage [examples](https://github.com/drewschrauf/bs-testing-library/tree/master/packages/examples/__tests__).\n\n## Installation\n\n**If you're using reason-react, don't install this! Follow the installation instructions for @drewschrauf/bs-react-testing-library instead.**\n\nInstall as a dev dependency:\n\n```sh\nnpm install --save-dev @drewschrauf/bs-dom-testing-library\n```\n\nAdd it to your bsconfig.json as a dev dependency.\n\n```json\n{\n  ...\n  \"bs-dev-dependencies\": [\n    ...\n    \"@drewschrauf/bs-dom-testing-library\"\n  ]\n}\n```\n\nIt's recommended to add `open DomTestingLibrary` at the top of each test file.\n\n## API\n\nThis documentation covers the specifics of these bindings. To learn about the principles and approach behind Testing Library, refer to the [official documentation](https://testing-library.com/).\n\n### Queries\n\nThere are [48 queries](https://testing-library.com/docs/dom-testing-library/api-queries) provided by @testing-library/dom-testing-library. They are a product of:\n\n- `getBy`, `getAllBy`, `queryBy`, `queryAllBy`, `findBy`, `findAllBy`; and\n- `ByLabelText`, `ByPlaceholderText`, `ByText`, `ByAltText`, `ByTitle`, `ByDisplayValue`, `ByRole`, `ByTestId`\n\nThis project extends these by a third dimension for the matcher:\n\n- String (no suffix)\n- Regex (`Re` suffix)\n- Function (`Fn` suffix)\n\nThis makes a total of 144 query methods that can be built from these parts, for example:\n\n- `getByText`\n- `queryAllByTitleRe`\n- `findByRoleFn`\n\nAdditional options are passed as optional named arguments, for example:\n\n```reason\ngetByText(\"Text\", ~exact=false)\n```\n\nRefer to the [Testing Library documentation](https://testing-library.com/docs/dom-testing-library/api-queries) for a full list of options supported by each query.\n\n### FireEvent\n\nEvents can be fired using methods in the `FireEvent` module. Generally you'd pipe an element into the method like below.\n\n```reason\nelement |> FireEvent.click\n```\n\nIf the event requires a payload (like `change`), pass the `eventInit` optional named parameter.\n\n```reason\nelement |> FireEvent.change({ \"target\": { \"value\": \"new value\" } })\n```\n\nBe sure to include the double quotes in the payload object! This ensures reason interprets it as a value of type `Js.t` instead of a record.\n\n### Utilities\n\nAt this point, the following utilities are implemented:\n\n- `waitFor`\n- `waitForElementToBeRemoved`\n- `debug`\n- `prettyDOM`\n- `screen`\n\nPull requests are appreciated for the rest of the suite.\n","readmeFilename":"README.md"}