{"id":37116962,"url":"https://github.com/orsinium-labs/testo","last_synced_at":"2026-01-14T13:41:59.244Z","repository":{"id":325602907,"uuid":"1100695039","full_name":"orsinium-labs/testo","owner":"orsinium-labs","description":"Go testing framework for matching a JSON payload against a pattern","archived":false,"fork":false,"pushed_at":"2025-11-22T08:47:11.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-22T10:28:29.388Z","etag":null,"topics":["go","golang","json","pattern-matching","test","testing","testing-framework"],"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/orsinium-labs.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-20T16:17:55.000Z","updated_at":"2025-11-22T08:46:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/orsinium-labs/testo","commit_stats":null,"previous_names":["orsinium-labs/testo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/orsinium-labs/testo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftesto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftesto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftesto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftesto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsinium-labs","download_url":"https://codeload.github.com/orsinium-labs/testo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftesto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["go","golang","json","pattern-matching","test","testing","testing-framework"],"created_at":"2026-01-14T13:41:58.748Z","updated_at":"2026-01-14T13:41:59.232Z","avatar_url":"https://github.com/orsinium-labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testo\n\nGo testing framework for matching a JSON payload against a pattern.\n\nThe pattern is a subset of JSON with some additional keywords that is then converted into a [valdo](github.com/orsinium-labs/valdo) validator.\n\n## Installation\n\n```bash\ngo get github.com/orsinium-labs/testo\n```\n\n## Usage\n\n```go\nfunc TestMyCoolAPI(t *testing.T) {\n    body := `{\"name\": \"aragorn\", \"age\": 87}`\n    testo.Assert(t, body, `{\"name\": \"aragorn\", \"age\": int}`)\n}\n```\n\nThe `body` can be bytes, string, or `io.Reader` (for example, an HTTP response body).\n\n## Syntax\n\nThe pattern syntax is a suparset JSON with a few additional features.\n\nKeywords:\n\n* `true`, `false`, `null`: same as in JSON.\n* `any`: a value of any type.\n* `string`: any string of any length.\n* `int`: an integer number.\n* `uint`: a non-negative integer number.\n* `float`: a floating point number.\n* `bool`: a boolean value (`true` or `false`).\n* `object`: any object.\n* `array`: any JSON array.\n* `strings`: array of strings (including empty array).\n* `ints`: array of integer numberss (including empty array).\n* `uints`: array of unsigned integer numbers (including empty array).\n* `floats`: array of floating point numbers (including empty array).\n* `bools`: array of boolean values (including empty array).\n* `objects`: array of objects (including empty array).\n\nIf a property name starts with `^`, it's interpreted as a regular expression. For example, the following pattern defines an object with non-empty unsigned integer numbers as keys and integer values:\n\n```json\n{\"^[0-9]+$\": int}\n```\n\nSo, if you want to assert only one property of an object:\n\n```json\n{\n    \"name\": \"Aragorn\",\n    \"^.+$\": any,\n}\n```\n\nAn object can have any number or properties and regex properties in any combination.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Ftesto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsinium-labs%2Ftesto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Ftesto/lists"}