{"id":16655634,"url":"https://github.com/mtrudel/machete","last_synced_at":"2025-03-15T12:30:32.685Z","repository":{"id":50190982,"uuid":"501027802","full_name":"mtrudel/machete","owner":"mtrudel","description":"Literate test matchers for ExUnit","archived":false,"fork":false,"pushed_at":"2023-10-23T15:12:49.000Z","size":177,"stargazers_count":51,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-11-23T16:46:39.924Z","etag":null,"topics":["elixir","elixir-lang","exunit","exunit-assertions","rspec-matchers","testing"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/mtrudel.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}},"created_at":"2022-06-07T22:51:38.000Z","updated_at":"2023-10-27T18:43:54.000Z","dependencies_parsed_at":"2023-10-02T21:34:30.012Z","dependency_job_id":"e222b16f-b940-4002-9a0c-0e27561fb531","html_url":"https://github.com/mtrudel/machete","commit_stats":{"total_commits":90,"total_committers":3,"mean_commits":30.0,"dds":"0.19999999999999996","last_synced_commit":"10c1ba7eeecceabb4516505b85aaefb6127a9a32"},"previous_names":[],"tags_count":9,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fmachete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fmachete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fmachete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fmachete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtrudel","download_url":"https://codeload.github.com/mtrudel/machete/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730865,"owners_count":20338729,"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":["elixir","elixir-lang","exunit","exunit-assertions","rspec-matchers","testing"],"created_at":"2024-10-12T09:53:37.914Z","updated_at":"2025-03-15T12:30:32.181Z","avatar_url":"https://github.com/mtrudel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Machete\n\n[![Build Status](https://github.com/mtrudel/machete/workflows/Elixir%20CI/badge.svg)](https://github.com/mtrudel/machete/actions)\n[![Docs](https://img.shields.io/badge/api-docs-green.svg?style=flat)](https://hexdocs.pm/machete)\n[![Hex.pm](https://img.shields.io/hexpm/v/machete.svg?style=flat\u0026color=blue)](https://hex.pm/packages/machete)\n\nMachete provides ergonomic match operators to help make your ExUnit tests more literate\n\nThe easiest way to explain Machete is to show it in action:\n\n```elixir\ndefmodule ExampleTest do\n  use ExUnit.Case\n  use Machete\n\n  test \"example test\" do\n    response = %{\n      id: 1,\n      name: \"Moe Fonebone\",\n      is_admin: false,\n      created_at: DateTime.utc_now()\n    }\n\n    assert response ~\u003e %{\n      id: integer(positive: true),\n      name: string(),\n      is_admin: false,\n      created_at: datetime(roughly: :now, time_zone: :utc)\n    }\n  end\nend\n```\n\nAt its heart, Machete provides the following two things:\n\n* A new `~\u003e` operator (the 'squiggle arrow') that does flexible matching of \n  its left operator with its right operator\n* A set of parametric matchers such as `string()` or `integer()` which can match\n  against general types. A comprehensive list of Machete's built-in matchers is\n  available [in the Machete\n  documentation](https://hexdocs.pm/machete/Machete.html)\n\nThese building blocks let you define test expectations that can match data against any\ncombination of literals, variables, or parametrically defined matchers\n\nWhen your matches fail, Machete provides useful error messages in ExUnit that point you directly\nat any failing matches using [jq syntax](https://stedolan.github.io/jq/manual/#Basicfilters)\n\n## Installation\n\nMachete is [available in Hex](https://hex.pm/packages/machete), and can be\ninstalled by adding `machete` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:machete, \"~\u003e 0.2.8\"}\n  ]\nend\n```\n\nDocumentation is published on [HexDocs](https://hexdocs.pm/machete)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtrudel%2Fmachete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtrudel%2Fmachete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtrudel%2Fmachete/lists"}