{"id":16482215,"url":"https://github.com/cobbinma/bromide","last_synced_at":"2026-06-08T18:31:32.518Z","repository":{"id":223184007,"uuid":"758420760","full_name":"cobbinma/bromide","owner":"cobbinma","description":"A snapshot testing library for go 📸","archived":false,"fork":false,"pushed_at":"2024-02-23T12:31:13.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T21:46:15.207Z","etag":null,"topics":["go","golang","snapshot","snapshot-testing","testing","testing-tools"],"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/cobbinma.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-16T09:32:58.000Z","updated_at":"2024-02-18T20:05:10.000Z","dependencies_parsed_at":"2024-06-21T14:07:46.672Z","dependency_job_id":"d7824ea6-400e-4b77-928b-7ae5c7a76361","html_url":"https://github.com/cobbinma/bromide","commit_stats":null,"previous_names":["cobbinma/bromide"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cobbinma/bromide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbinma%2Fbromide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbinma%2Fbromide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbinma%2Fbromide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbinma%2Fbromide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cobbinma","download_url":"https://codeload.github.com/cobbinma/bromide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbinma%2Fbromide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34075952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["go","golang","snapshot","snapshot-testing","testing","testing-tools"],"created_at":"2024-10-11T13:10:02.198Z","updated_at":"2026-06-08T18:31:32.514Z","avatar_url":"https://github.com/cobbinma.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003ebromide\u003c/h1\u003e\n \u003cstrong\u003e\n  A snapshot testing library for go 📸\n \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n \u003cbr /\u003e\n \u003cimg src=\"./assets/camera.png\" height=\"auto\" width=\"200\"\u003e\n\u003c/div\u003e\n\n\n## Introduction\n\nBromide is a snapshot library for Go, designed to simplify managing snapshot tests.\n\nWith Bromide, you can easily capture test output and then review any differences against expected values.\n\n## Usage\n\n### 1. Write a Snapshot Test\n\nInstall the library:\n\n```sh\ngo get github.com/cobbinma/bromide\n```\n\nWrite a test that calls `bromide.Snapshot`:\n\n```go\nimport github.com/cobbinma/bromide\n\nfunc TestSomething(t *testing.T) {\n    text := \"world\"\n    something := testStruct{\n      example: \u0026text,\n      again:   5,\n    }\n\n    bromide.Snapshot(t, something)\n}\n```\n\n### 2. Run Your Tests\n\nRun your tests as usual:\n\n```sh\ngo test ./...\n```\n\nIf the snapshot does not match, you will see output like:\n\n```\n--- FAIL: TestSomething (0.00s)\n    bromide_test.go:24: snapshot mismatch\n    bromide_test.go:24:\n        --- current\n        +++ incoming\n        @@ -1,4 +1,4 @@\n         (bromide_test.testStruct) {\n        -  example: (*string)((len=5) \"hello\"),\n        +  example: (*string)((len=5) \"world\"),\n           again: (int) 5\n         }\n\n    bromide_test.go:24: to review and approve new snapshots, run `bromide`\nFAIL\nFAIL    github.com/cobbinma/bromide     0.211s\nFAIL\n```\n\n### 3. Review and Approve Snapshot Changes\n\nInstall the Bromide CLI if you haven't already:\n\n```sh\ngo install github.com/cobbinma/bromide/cmd/bromide@v0.0.2\n```\n\nRun the review tool to inspect and approve changed snapshots:\n\n```sh\nbromide\n```\n\nThis will show you a UI to review, approve, or reject snapshot updates.\n\n![screenshot](./assets/Screenshot.png)\n\n## See Also\n\n* [cupaloy](https://github.com/bradleyjkemp/cupaloy)\n\n## Thanks\n\n* [cupaloy](https://github.com/bradleyjkemp/cupaloy)\n* [insta](https://github.com/mitsuhiko/insta)\n* [birdie](https://github.com/giacomocavalieri/birdie)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobbinma%2Fbromide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcobbinma%2Fbromide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobbinma%2Fbromide/lists"}