{"id":13621242,"url":"https://github.com/maprost/should","last_synced_at":"2026-01-17T15:34:32.805Z","repository":{"id":57499325,"uuid":"86495214","full_name":"maprost/should","owner":"maprost","description":"lightwight test environment","archived":false,"fork":false,"pushed_at":"2018-05-24T09:52:42.000Z","size":34,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-14T05:54:21.093Z","etag":null,"topics":["assert","assertions","go","golang","testing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maprost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-28T18:45:25.000Z","updated_at":"2021-04-10T00:42:21.000Z","dependencies_parsed_at":"2022-08-28T15:21:37.752Z","dependency_job_id":null,"html_url":"https://github.com/maprost/should","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maprost/should","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maprost%2Fshould","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maprost%2Fshould/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maprost%2Fshould/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maprost%2Fshould/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maprost","download_url":"https://codeload.github.com/maprost/should/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maprost%2Fshould/sbom","scorecard":{"id":616976,"data":{"date":"2025-08-11","repo":{"name":"github.com/maprost/should","commit":"db768985d57f011d1d56eb32bfc523442aedeaaa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T04:15:09.053Z","repository_id":57499325,"created_at":"2025-08-21T04:15:09.053Z","updated_at":"2025-08-21T04:15:09.053Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["assert","assertions","go","golang","testing"],"created_at":"2024-08-01T21:01:03.895Z","updated_at":"2026-01-17T15:34:32.786Z","avatar_url":"https://github.com/maprost.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/maprost/should.svg)](https://travis-ci.org/maprost/should)\n[![Coverage Status](https://coveralls.io/repos/github/maprost/should/badge.svg)](https://coveralls.io/github/maprost/should)\n[![GoDoc](https://godoc.org/github.com/maprost/should?status.svg)](https://godoc.org/github.com/maprost/should)\n[![Go Report Card](https://goreportcard.com/badge/github.com/maprost/should)](https://goreportcard.com/report/github.com/maprost/should)\n[![Version](https://img.shields.io/github/release/maprost/should.svg)](https://github.com/maprost/should/releases)\n\n# Should\nlightweight test environment\n\n## Install\n```\ngo get github.com/maprost/should\n```\n\n## Supported methods\n- `should.BeEqual`(`t`, `element`, `element`) -\u003e check if two elements are equal\n- `should.NotBeEqual`(`t`,`element`, `element`) -\u003e check if two elements are not equal\n- `should.BeNil`(`t`,`element`)  -\u003e check if an element it nil\n- `should.NotBeNil`t`,`(`element`)  -\u003e check if an element is not nil\n- `should.BeTrue`(`t`,`element`)  -\u003e check if an element is `true`\n- `should.BeFalse`(`t`,`element`) -\u003e check if an element is `false`\n- `should.HaveLength`(`t`,`collection`, `length`) -\u003e (only for `array`/`slice`/`map`) check the length of the collection\n- `should.Contain`(`t`,`collection`, `element`) -\u003e (only for `array`/`slice`/`map`/`string`) check if the collection contains the element\n- `should.NotContain`(`t`,`collection`, `element`) -\u003e (only for `array`/`slice`/`map`) check if the collection contains not the element\n- `should.BeSimilar`(`t`,`collection`, `collection`) -\u003e (only for `array`/`slice`) check if the two collections contains the same elements\n- `should.NotBeSimilar`(`t`,`collection`, `collection`) -\u003e (only for `array`/`slice`) check if the two collections contains at least one different element\n- `should.Fail` -\u003e stops the tests with the given error message\n\n## Usage\nPlease look into the test files to see the possibilities. For the first look\nhere some examples:\n\n```go\nfunc TestSimple(t *testing.T) {\n\tshould.BeEqual(t, 1, 1, \"should be equal\")\n\tshould.BeNil(t, nil)\n\tshould.NotBeNil(t, 1)\n\tshould.BeTrue(t, true)\n\tshould.BeFalse(t, false)\n\tshould.NotBeEqual(t, 1, 2)\n\tshould.NotBeEqual(t, 1.0, 1)\n\tshould.NotBeEqual(t, int64(1), int32(1))\n}\n\nfunc TestDataStructures(t *testing.T) {\n\tshould.HaveLength(t, []int{1, 2, 3}, 3)\n\tshould.HaveLength(t, [3]int{1, 2, 3}, 3)\n\tshould.HaveLength(t, map[int]int{1: 1, 2: 3, 3: 5}, 3)\n\tshould.BeEqual(t, []int{1, 2, 3}, []int{1, 2, 3})\n\tshould.NotBeEqual(t, []int{1, 2, 3}, []int{3, 2, 1})\n\tshould.BeSimilar(t, []int{1, 2, 3}, []int{3, 2, 1})\n\tshould.BeSimilar(t, []int{1, 2, 3}, [3]int{3, 2, 1})\n\tshould.NotBeSimilar(t, []int{1, 2, 3}, [3]int{3, 2, 4})\n\tshould.NotBeSimilar(t, []int{1, 2, 3}, []int{2, 3, 4, 1})\n\tshould.NotBeEqual(t, []int{1, 2, 3}, [3]int{1, 2, 3})\n\tshould.BeEqual(t, [3]int{1, 2, 3}, [3]int{1, 2, 3})\n\tshould.Contain(t, []int{1, 2, 3}, 2)\n\tshould.NotContain(t, []int{1, 2, 3}, 4)\n\tshould.Contain(t, [3]int{1, 2, 3}, 3)\n\tshould.NotContain(t, [3]int{1, 2, 3}, 4)\n\tshould.BeEqual(t, map[int]string{1: \"1\", 2: \"2\", 3: \"3\"}, map[int]string{1: \"1\", 2: \"2\", 3: \"3\"})\n\tshould.NotBeEqual(t, map[int]string{1: \"1\", 3: \"3\"}, map[int]string{1: \"1\", 4: \"4\"})\n\tshould.BeEqual(t, map[int]string{1: \"1\", 3: \"3\"}, map[int]string{3: \"3\", 1: \"1\"})\n\tshould.Contain(t, map[int]string{1: \"11\", 3: \"33\"}, \"33\")\n\tshould.NotContain(t, map[int]string{1: \"11\", 3: \"33\"}, \"55\")\n}\n\nfunc TestStructs(t *testing.T) {\n\ttype Post struct {\n\t\tId  int64\n\t\tMsg string\n\t}\n\n\tp1 := Post{Id: 12, Msg: \"New\"}\n\tp2 := Post{Id: 12, Msg: \"New\"}\n\tp3 := Post{Id: 12, Msg: \"Old\"}\n\n\tshould.BeEqual(t, p1, p1)\n\tshould.BeEqual(t, p1, p2)\n\tshould.BeEqual(t, \u0026p1, \u0026p2)\n\tshould.NotBeEqual(t, p1, p3)\n\tshould.NotBeEqual(t, p1, \u0026p1)\n\n\tshould.BeEqual(t, []Post{p1}, []Post{p2})\n\tshould.NotBeEqual(t, []Post{p1}, []Post{p3})\n\tshould.Contain(t, []Post{p1, p2, p3}, p3)\n\tshould.Contain(t, []*Post{\u0026p1, \u0026p2, \u0026p3}, \u0026p3)\n\tshould.Contain(t, []*Post{\u0026p1, \u0026p3}, \u0026p2)\n\tshould.NotContain(t, []Post{p1, p2}, p3)\n\tshould.NotContain(t, []Post{p1}, 22)\n\tshould.NotContain(t, []Post{}, p1)\n\tshould.NotContain(t, []*Post{\u0026p1, \u0026p2}, \u0026p3)\n\tshould.NotContain(t, []*Post{\u0026p1, \u0026p2}, p2)\n\n\tshould.BeEqual(t, [1]Post{p1}, [1]Post{p2})\n\tshould.NotBeEqual(t, [1]Post{p1}, [1]Post{p3})\n\tshould.Contain(t, [2]Post{p1, p2}, p2)\n\tshould.Contain(t, [3]*Post{\u0026p1, \u0026p2, \u0026p3}, \u0026p3)\n\tshould.Contain(t, [2]*Post{\u0026p1, \u0026p3}, \u0026p2)\n\tshould.NotContain(t, [2]Post{p1, p2}, p3)\n\tshould.NotContain(t, [1]Post{p1}, \"blob\")\n\tshould.NotContain(t, [0]Post{}, p1)\n\tshould.NotContain(t, [2]*Post{\u0026p1, \u0026p2}, \u0026p3)\n\tshould.NotContain(t, [2]*Post{\u0026p1, \u0026p2}, p1)\n\n\tshould.BeEqual(t, map[int]Post{1: p1}, map[int]Post{1: p2})\n\tshould.NotBeEqual(t, map[int]Post{1: p1}, map[int]Post{1: p3})\n\tshould.NotBeEqual(t, map[int]Post{1: p1}, map[int]Post{2: p1})\n\tshould.Contain(t, map[int]Post{1: p1, 2: p2}, p2)\n\tshould.Contain(t, map[int]*Post{1: \u0026p1, 2: \u0026p2}, \u0026p2)\n\tshould.NotContain(t, map[int]Post{1: p1, 2: p2}, p3)\n\tshould.NotContain(t, map[int]Post{1: p1}, \"blob\")\n\tshould.NotContain(t, map[int]Post{}, p1)\n\tshould.NotContain(t, map[int]*Post{1: \u0026p1}, p1)\n}\n```\n\n## Output\nThe output of a failed test shows you the actual and expected value and a stacktrace.\n```\nshould.go:75: Not equal:\n\t  actual: 1(float64)\n\texpected: 1(int)\n\t/.../src/github.com/maprost/should/failing_test.go:12 +0xd1\n\t/usr/local/go/src/testing/testing.go:657 +0x96\n\t/usr/local/go/src/testing/testing.go:697 +0x2ca\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaprost%2Fshould","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaprost%2Fshould","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaprost%2Fshould/lists"}