{"id":19149255,"url":"https://github.com/restuwahyu13/gocek","last_synced_at":"2025-05-07T04:41:59.312Z","repository":{"id":64614776,"uuid":"569652844","full_name":"restuwahyu13/gocek","owner":"restuwahyu13","description":"Gocek is a simple tools for BDD / TDD testing assertion library for golang.","archived":false,"fork":false,"pushed_at":"2022-12-17T16:25:20.000Z","size":80,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T04:41:53.342Z","etag":null,"topics":["assertions","bdd","go","gocek","golang","golang-library","integration-testing","tdd","testing-tool","toolkit","unit-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/restuwahyu13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-23T10:11:50.000Z","updated_at":"2023-05-19T22:14:49.000Z","dependencies_parsed_at":"2023-01-29T17:30:29.339Z","dependency_job_id":null,"html_url":"https://github.com/restuwahyu13/gocek","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fgocek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fgocek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fgocek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fgocek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restuwahyu13","download_url":"https://codeload.github.com/restuwahyu13/gocek/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816518,"owners_count":21808702,"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","bdd","go","gocek","golang","golang-library","integration-testing","tdd","testing-tool","toolkit","unit-testing"],"created_at":"2024-11-09T08:07:22.904Z","updated_at":"2025-05-07T04:41:59.285Z","avatar_url":"https://github.com/restuwahyu13.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gocek\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/restuwahyu13/gocek?style=flat)\n[![Go Report Card](https://goreportcard.com/badge/github.com/restuwahyu13/gocek)](https://goreportcard.com/report/github.com/restuwahyu13/gocek)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/restuwahyu13/gocek/blob/master/CONTRIBUTING.md)\n\n**Gocek** is a simple tools for BDD / TDD testing assertion library for golang, that can be delightfully paired with any golang testing framework or without framework.\n\n## Table Of Content\n\n- [Gocek](#gocek)\n  - [Table Of Content](#table-of-content)\n  - [Installation](#installation)\n  - [API Reference](#api-reference)\n  - [Testing](#testing)\n  - [Bugs](#bugs)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Installation\n\n```bash\ngo get github.com/restuwahyu13/gocek\n```\n\n## API Reference\n\n| **Method**                 | **Params** | **Type Data**    | **Description**                                                                                                           |\n| -------------------------- | ---------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| **Expect**                 | **value**  | **interface{}**  | `Expect` function is used every time you want to test a value.                                                            |\n| **Not**                    | **none**   | **-**            | `Not` If you know how to test something, .not lets you test its opposite                                                  |\n| **ToBe**                   | **value**  | **interface{}**  | `ToBe` to compare primitive values, but not support for type object like slice, map, struct or array.                     |\n| **ToBeFalsy**              | **none**   | **-**            | `ToBeFalsy` when you don't care what a value is and you want to ensure a value is false in a boolean context.             |\n| **ToBeGreaterThan**        | **value**  | **interface{}**  | `ToBeGreaterThan `to compare received \u003e expected for number or big integer values                                         |\n| **ToBeGreaterThanOrEqual** | **value**  | **interface{}**  | `ToBeGreaterThan` to compare received \u003e= expected for number or big integer values                                        |\n| **ToBeInstanceOf**         | **value**  | **reflect.Kind** | `ToBeInstanceOf` to check that an object is an instance of a class. This matcher uses instanceof underneath               |\n| **ToBeLessThan**           | **value**  | **interface{}**  | `ToBeLessThan`to compare received \u003c expected for number or big integer values                                             |\n| **ToBeLessThanOrEqual**    | **value**  | **interface{}**  | `ToBeLessThanOrEqual` to compare received \u003c= expected for number or big integer values                                    |\n| **ToBeMinus**              | **none**   | **-**            | `ToBeMinus` when you don't care what a value is and you want to ensure a value is minus in a float or integer context.    |\n| **ToBeNil**                | **none**   | **-**            | `ToBeNil` when you don't care what a value is and you want to ensure a value is nil context.                              |\n| **ToBeTruthy**             | **none**   | **-**            | `ToBeTruthy` when you don't care what a value is and you want to ensure a value is false in a boolean context.            |\n| **ToBeZero**               | **none**   | **-**            | `ToBeZero` when you don't care what a value is and you want to ensure a value is zero in a integer or float context.      |\n| **ToContain**              | **value**  | **string**       | `ToContain` when you want to check that an item is in an string                                                           |\n| **ToEqual**                | **value**  | **interface{}**  | `ToEqual` to compare recursively primitive values or all properties of object instances like slice, map, struct or array. |\n| **ToHaveLength**           | **value**  | **int**          | `ToHaveLength` to check that an object has a length property and it is set to a certain numeric value.                    |\n| **ToHaveReturned**         | **none**   | **-**            | `ToHaveReturned` to check function returned value or not                                                                  |\n| **ToMatchObject**          | **value**  | **interface{}**  | `ToMatchObject` to check that a slice, map, struct or array matches a subset of the properties of an object.              |\n| **ToMatch**                | **regex**  | **string**       | `ToMatch` to check that a string matches a regular expression.                                                            |\n| **ToBeError**              | **none**   | **-**            | `ToBeError` when you don't care what a value is and you want to ensure a value is error context.                          |\n| **ToHaveReturnedTimes**    | **value**  | **interface{}**  | `ToHaveReturnedTimes` to ensure that a function returned successfully an exact number of times.                           |\n\n## Testing\n\n- Testing Via Local\n\n  ```sh\n  go test .\n  ```\n\n- Testing Via Docker\n\n  ```sh\n  docker build -t gocek --compress . \u0026\u0026 docker run gocek go test --cover -v --failfast .\n  ```\n\n## Bugs\n\nFor information on bugs related to package libraries, please visit [here](https://github.com/restuwahyu13/gocek/issues)\n\n## Contributing\n\nWant to make **gocek** more perfect ? Let's contribute and follow the\n[contribution guide.](https://github.com/restuwahyu13/gocek/blob/main/CONTRIBUTING.md)\n\n## License\n\n- [MIT License](https://github.com/restuwahyu13/gocek/blob/master/LICENSE.md)\n\n\u003cp align=\"right\" style=\"padding: 5px; border-radius: 100%; background-color: red; font-size: 2.5rem;\"\u003e\n  \u003cb\u003e\u003ca href=\"#gocek\"\u003eBACK TO TOP\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fgocek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestuwahyu13%2Fgocek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fgocek/lists"}