{"id":15853855,"url":"https://github.com/ivangabriele/jrest","last_synced_at":"2026-01-15T23:06:31.152Z","repository":{"id":177044515,"uuid":"658945023","full_name":"ivangabriele/jrest","owner":"ivangabriele","description":"The equivalent of Jest for Rust.","archived":false,"fork":false,"pushed_at":"2024-03-25T22:57:24.000Z","size":64,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T14:06:48.316Z","etag":null,"topics":["jest","rust","test","test-framework","testing","unit","unit-test","unit-testing","unittest"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ivangabriele.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":"2023-06-26T20:33:29.000Z","updated_at":"2024-06-06T22:41:16.659Z","dependencies_parsed_at":"2023-11-11T04:20:21.139Z","dependency_job_id":"29759f35-24d1-4567-ac1e-6ed6242c1a3d","html_url":"https://github.com/ivangabriele/jrest","commit_stats":null,"previous_names":["ivangabriele/rest"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangabriele%2Fjrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangabriele%2Fjrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangabriele%2Fjrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangabriele%2Fjrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivangabriele","download_url":"https://codeload.github.com/ivangabriele/jrest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246693665,"owners_count":20818926,"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":["jest","rust","test","test-framework","testing","unit","unit-test","unit-testing","unittest"],"created_at":"2024-10-05T19:23:23.880Z","updated_at":"2026-01-15T23:06:26.132Z","avatar_url":"https://github.com/ivangabriele.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jrest\n\n[![Crates.io Package](https://img.shields.io/crates/v/jrest?style=for-the-badge)](https://crates.io/crates/jrest)\n[![Docs.rs Documentation](https://img.shields.io/docsrs/jrest/latest?style=for-the-badge)](https://docs.rs/jrest/latest/jrest)\n[![Test Workflow Status](https://img.shields.io/github/actions/workflow/status/ivangabriele/jrest/test.yml?label=CI\u0026style=for-the-badge)](https://github.com/ivangabriele/jrest/actions?query=branch%3Amain+workflow%3ATest++)\n[![Code Coverage](https://img.shields.io/codecov/c/github/ivangabriele/jrest/main?label=Cov\u0026style=for-the-badge)](https://app.codecov.io/github/ivangabriele/jrest)\n\nThe equivalent of [Jest](https://jestjs.io) for Rust.\n\n**Jrest** is a testing framework project for Rust, inspired by [Jest](https://jestjs.io),\neasy to write and easy to read, with fancy diffs when tests fail.\n\n\u003e ⚠️ Be aware that this is a work in progress.\n \nBut it should get regular updates since I'm using it every week on my own open-source projects.\n\n---\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [`.to_be()`](#to_be)\n  - [Primitives](#primitives)\n    - [`.to_be_greater_than()`](#to_be_greater_than)\n    - [`.to_be_greater_than_or_equal()`](#to_be_greater_than_or_equal)\n    - [`.to_be_less_than()`](#to_be_less_than)\n    - [`.to_be_less_than_or_equal()`](#to_be_less_than_or_equal)\n  - [Strings](#strings)\n    - [`.to_start_with()`](#to_start_with)\n    - [`.to_start_with()`](#to_start_with-1)\n- [Roadmap](#roadmap)\n- [Thanks](#thanks)\n\n---\n\n## Installation\n\n```sh\ncargo add --dev jrest\n```\n\n## Usage\n\n### `.to_be()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(\"A \u0026str\").to_be(\"A \u0026str\");\n      expect!(\"A String\".to_string()).to_be(\"A String\".to_string());\n  }\n}\n```\n\n### Primitives\n\n#### `.to_be_greater_than()`\n\n```rust\n#[cfg(test)]\n  mod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(3).to_be_greater_than(2);\n  }\n}\n```\n\n#### `.to_be_greater_than_or_equal()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(3).to_be_greater_than_or_equal(2);\n      expect!(3).to_be_greater_than_or_equal(3);\n  }\n}\n```\n\n#### `.to_be_less_than()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(2).to_be_less_than(3);\n  }\n}\n```\n\n#### `.to_be_less_than_or_equal()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(2).to_be_less_than_or_equal(3);\n      expect!(2).to_be_less_than_or_equal(2);\n  }\n}\n```\n\n### Strings\n\n#### `.to_start_with()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(\"cargo\").to_end_with(\"go\");\n  }\n}\n```\n\n#### `.to_start_with()`\n\n```rust\n#[cfg(test)]\nmod tests {\n  use jrest::expect;\n\n  #[test]\n  fn test_something() {\n      expect!(\"cargo\").to_start_with(\"car\");\n  }\n}\n```\n\n## Roadmap\n\n- [ ] `.toContain()`\n- [ ] `.toHaveLength()`\n- [ ] `.toMatch()`\n- [ ] `.toMatchObject()`\n- [ ] `.toThrow()`\n\n## Thanks\n\n- [Tom Pridham](https://github.com/TomPridham)\n  for [test-env-helpers](https://github.com/TomPridham/test-env-helpers) inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangabriele%2Fjrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivangabriele%2Fjrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangabriele%2Fjrest/lists"}