{"id":27135517,"url":"https://github.com/qbart/expecto","last_synced_at":"2025-08-20T23:07:55.657Z","repository":{"id":286206801,"uuid":"960716668","full_name":"qbart/expecto","owner":"qbart","description":"Mini testing library for Go based on stdlib. Fails early with colored output.","archived":false,"fork":false,"pushed_at":"2025-04-05T12:05:35.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T00:06:41.918Z","etag":null,"topics":["assertions","go","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/qbart.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":"2025-04-04T23:34:54.000Z","updated_at":"2025-04-05T12:05:38.000Z","dependencies_parsed_at":"2025-04-05T00:37:57.382Z","dependency_job_id":null,"html_url":"https://github.com/qbart/expecto","commit_stats":null,"previous_names":["qbart/expecto"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fexpecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fexpecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fexpecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fexpecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbart","download_url":"https://codeload.github.com/qbart/expecto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131316,"owners_count":21052819,"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":["assertions","go","testing"],"created_at":"2025-04-08T01:48:26.608Z","updated_at":"2025-08-20T23:07:55.651Z","avatar_url":"https://github.com/qbart.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# expecto\n\n![example spec](https://github.com/user-attachments/assets/f7e4a512-59d4-4aa7-abd2-6d509b56a74a)\n\nIdea is to provide simple wrapper for testing library that immediately exits when assertion fails\nand prints colored output with diff.\n\nMost matchers follow the pattern: `matcher(t *testing.T, msg string, value any, expected any)`\n\n## Matchers\n\n```go\nexpecto.NoErr(t, \"parsing config\", err)\nexpecto.Eq(t, \"number of files\", len(c.Files), 1)\nexpecto.Eq(t, \"number of chunks\", len(c.Files[0].Chunks), 2)\nexpecto.Eq(t, \"number of migrations\", len(c.Files[0].Migrations), 1)\nexpecto.Nil(t, \"transaction\", c.Transaction)\nexpecto.Contains(t, \"notification message\", str, \"error message\")\nexpecto.Map(t, anyMap).HasKey(\"has cache key\", \"cache-1\")\n```\n\nSee files for the full list of assertions.\n\n## Temporary file system\n\nRandom dir in system TempDir is created.\n\n```go\nfs, dir, cleanup := expecto.TempFS(\n   \"src/path.txt\",\n   \"content1\",\n   \"src/b/2.txt\",\n   \"content2,\n)\ndefer cleanup()\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Fexpecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbart%2Fexpecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Fexpecto/lists"}