{"id":22898988,"url":"https://github.com/dzakh/rescript-ava","last_synced_at":"2025-05-07T23:08:13.443Z","repository":{"id":44356912,"uuid":"463246874","full_name":"DZakh/rescript-ava","owner":"DZakh","description":"🪲 ReScript bindings for Ava","archived":false,"fork":false,"pushed_at":"2024-12-22T16:18:50.000Z","size":146,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T23:08:06.732Z","etag":null,"topics":["ava","nodejs","rescript","rescript-bindings","tdd","test-framework","test-runner","testing"],"latest_commit_sha":null,"homepage":"","language":"ReScript","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/DZakh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-24T17:49:26.000Z","updated_at":"2025-02-23T20:01:39.000Z","dependencies_parsed_at":"2024-04-30T18:56:16.459Z","dependency_job_id":"bf2dec73-c9e7-4574-9709-ec2fa2c515b5","html_url":"https://github.com/DZakh/rescript-ava","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"f9de9e3891f6401115cca92e63cd66140e970fc2"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DZakh%2Frescript-ava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DZakh%2Frescript-ava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DZakh%2Frescript-ava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DZakh%2Frescript-ava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DZakh","download_url":"https://codeload.github.com/DZakh/rescript-ava/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968118,"owners_count":21833251,"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":["ava","nodejs","rescript","rescript-bindings","tdd","test-framework","test-runner","testing"],"created_at":"2024-12-14T00:35:34.757Z","updated_at":"2025-05-07T23:08:13.435Z","avatar_url":"https://github.com/DZakh.png","language":"ReScript","readme":"# rescript-ava\n\nRuntime free [ReScript](https://github.com/rescript-lang) bindings for [Ava](https://github.com/avajs/ava)\n\n## Usage\n\n### Installation\n\n```sh\nnpm install -D @dzakh/rescript-ava ava\n```\n\nThen add `@dzakh/rescript-ava` to `bs-dev-dependencies` in your `rescript.json`:\n\n```diff\n{\n  ...\n+ \"bs-dev-dependencies\": [\"@dzakh/rescript-ava\"]\n}\n```\n\nThen add `__tests__` to `sources` in your `rescript.json`:\n\n```diff\n\"sources\": [\n  {\n    \"dir\": \"src\"\n  },\n+ {\n+   \"dir\": \"__tests__\",\n+   \"type\": \"dev\"\n+ }\n]\n```\n\nThen add `test` script and minimalistic configuration in your `package.json`:\n\n```diff\n{\n  \"name\": \"awesome-package\",\n  \"scripts\": {\n+   \"test\": \"ava\"\n  },\n  \"devDependencies\": {\n    \"@dzakh/rescript-ava\": \"latest\"\n  },\n+ \"ava\": {\n+   \"files\": [\n+     \"__tests__/**/*_test.mjs\",\n+     \"__tests__/**/*_test.bs.js\"\n+   ]\n+ }\n}\n```\n\n### Create your test file\n\nCreate a test file in the **tests** directory and use the suffix `*_test.res`. When compiled they will be put in a **tests** directory with a `*_test.bs.js` suffix, ready to be picked up when you run ava. If you're not already familiar with [Ava](https://github.com/avajs/ava), see [the Ava documentation](https://github.com/avajs/ava#documentation).\n\n```res\n// __tests__/Main_test.res\nopen Ava\n\ntest(\"foo\", t =\u003e {\n  t-\u003eAssert.pass\n})\n\nasyncTest(\"bar\", t =\u003e {\n  Promise.resolve(\"bar\")-\u003ePromise.thenResolve(bar =\u003e {\n    t-\u003eAssert.is(bar, \"bar\")\n  })\n})\n\n```\n\n### Running your tests\n\n```sh\nnpm test\n```\n\nOr with npx:\n\n```sh\nnpx ava\n```\n\nRun with the --watch flag to enable AVA's [watch mode](https://github.com/avajs/ava/blob/main/docs/recipes/watch-mode.md):\n\n```sh\nnpx ava --watch\n```\n\n## Documentation\n\nFor the moment, please refer to [Ava.res](./src/Ava.res).\n\n## Examples\n\nOpen source projects using **rescript-ava**:\n\n- [rescript-schema](https://github.com/DZakh/rescript-schema) - The fastest parser in the entire JavaScript ecosystem with a focus on small bundle size and top-notch DX\n- [rescript-rest](https://github.com/DZakh/rescript-rest) - RPC-like client, contract, and server implementation for a pure REST API\n- [rescript-envsafe](https://github.com/DZakh/rescript-envsafe) - Makes sure you don't accidentally deploy apps with missing or invalid environment variables\n- [rescript-json-schema](https://github.com/DZakh/rescript-json-schema) - Typesafe JSON schema for ReScript\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzakh%2Frescript-ava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzakh%2Frescript-ava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzakh%2Frescript-ava/lists"}