{"id":13726605,"url":"https://github.com/wyze/bs-jest-dom","last_synced_at":"2025-05-07T01:22:27.426Z","repository":{"id":33000800,"uuid":"149214560","full_name":"wyze/bs-jest-dom","owner":"wyze","description":"BuckleScript bindings for jest-dom.","archived":false,"fork":false,"pushed_at":"2023-01-06T01:42:43.000Z","size":1368,"stargazers_count":13,"open_issues_count":15,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T22:04:57.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://yarn.pm/bs-jest-dom","language":"Reason","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wyze.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-18T02:05:14.000Z","updated_at":"2022-08-01T01:58:20.000Z","dependencies_parsed_at":"2023-01-14T22:59:39.518Z","dependency_job_id":null,"html_url":"https://github.com/wyze/bs-jest-dom","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyze%2Fbs-jest-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyze%2Fbs-jest-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyze%2Fbs-jest-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyze%2Fbs-jest-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wyze","download_url":"https://codeload.github.com/wyze/bs-jest-dom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252794293,"owners_count":21805174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:03:14.362Z","updated_at":"2025-05-07T01:22:27.406Z","avatar_url":"https://github.com/wyze.png","language":"Reason","funding_links":[],"categories":["Reason"],"sub_categories":[],"readme":"# bs-jest-dom \u0026middot; [![Build Status][actions-image]][actions-url] [![npm][npm-image]][npm-url] [![Codecov][codecov-image]][codecov-url]\n\n\u003e [BuckleScript](//github.com/BuckleScript/bucklescript) bindings for [jest-dom](//github.com/testing-library/jest-dom).\n\n## Installation\n\n```sh\n$ yarn add --dev bs-jest-dom\n\n# or..\n\n$ npm install --save-dev bs-jest-dom\n```\n\n## Usage\n\n#### Add to `bsconfig.json`\n\n```json\n{\n  \"bs-dev-dependencies\": [\"bs-jest-dom\"]\n}\n```\n\n#### With [`bs-jest`](//github.com/glennsl/bs-jest) and [`bs-react-testing-library`](//github.com/wyze/bs-react-testing-library)\n\n```ocaml\n/* Heading_test.re */\n\nopen Jest;\nopen JestDom;\nopen ReactTestingLibrary;\n\nmodule Heading = {\n  [@react.component]\n  let make = (~text) =\u003e \u003ch1\u003e {ReasonReact.string(text)} \u003c/h1\u003e;\n};\n\ntest(\"renders in the document\", () =\u003e\n  \u003cHeading text=\"Hello, World!\" /\u003e\n  |\u003e render\n  |\u003e getByText(~matcher=`Str(\"Hello, World!\"))\n  |\u003e expect\n  |\u003e toBeInTheDocument\n);\n```\n\n#### With [`bs-jest`](//github.com/glennsl/bs-jest) and [`bs-webapi`](//github.com/reasonml-community/bs-webapi-incubator)\n\n```ocaml\n/* Heading_test.re */\n\nopen Jest;\nopen JestDom;\nopen Webapi.Dom;\nopen Webapi.Dom.Element;\n\ntest(\"heading is visible\", () =\u003e {\n  let div = Document.createElement(\"div\", document);\n\n  div-\u003esetInnerHTML(\"\u003ch1\u003eHello, World!\u003c/h1\u003e\");\n\n  div\n  |\u003e querySelector(\"h1\")\n  |\u003e expect\n  |\u003e toBeVisible;\n});\n```\n\n## Examples\n\nSee [`src/__tests__`](src/__tests__) for some examples.\n\n## Development\n\n```sh\n$ git clone https://github.com/wyze/bs-jest-dom.git\n$ cd bs-jest-dom\n$ yarn # or `npm install`\n```\n\n## Build\n\n```sh\n$ yarn build\n```\n\n## Test\n\n```sh\n$ yarn test\n```\n\n## Change Log\n\n\u003e [Full Change Log](changelog.md)\n\n### [v4.1.1](https://github.com/wyze/bs-jest-dom/releases/tag/v4.1.1) (2020-06-17)\n\n* Fix JSX and bs-webapi to compile on BS 8 ([@johnridesabike](https://github.com/johnridesabike) in [#20](https://github.com/wyze/bs-jest-dom/pull/20))\n\n## License\n\nMIT © [Neil Kistner](https://neilkistner.com)\n\n[actions-image]: https://img.shields.io/github/workflow/status/wyze/bs-jest-dom/CI.svg?style=flat-square\n[actions-url]: https://github.com/wyze/bs-jest-dom/actions\n\n[npm-image]: https://img.shields.io/npm/v/bs-jest-dom.svg?style=flat-square\n[npm-url]: https://npm.im/bs-jest-dom\n\n[codecov-image]: https://img.shields.io/codecov/c/github/wyze/bs-jest-dom.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/wyze/bs-jest-dom\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyze%2Fbs-jest-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyze%2Fbs-jest-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyze%2Fbs-jest-dom/lists"}