{"id":25014326,"url":"https://github.com/gregoryv/asserter","last_synced_at":"2025-03-30T05:13:15.984Z","repository":{"id":57487321,"uuid":"164505075","full_name":"gregoryv/asserter","owner":"gregoryv","description":"Go package for simple assertions","archived":false,"fork":false,"pushed_at":"2024-03-22T06:32:20.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T07:19:32.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/gregoryv.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}},"created_at":"2019-01-07T22:13:57.000Z","updated_at":"2024-03-22T06:32:00.000Z","dependencies_parsed_at":"2024-03-22T07:39:09.352Z","dependency_job_id":"7fdade34-0285-4145-92a0-b62aba78932c","html_url":"https://github.com/gregoryv/asserter","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.09836065573770492,"last_synced_commit":"9f8c8e77f7605617b541ba9ed64818d0f73e28a3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Fasserter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Fasserter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Fasserter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Fasserter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregoryv","download_url":"https://codeload.github.com/gregoryv/asserter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277360,"owners_count":20751549,"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":[],"created_at":"2025-02-05T07:19:06.495Z","updated_at":"2025-03-30T05:13:15.967Z","avatar_url":"https://github.com/gregoryv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/gregoryv/asserter.svg?branch=master)](https://travis-ci.org/gregoryv/asserter)\n[![codecov](https://codecov.io/gh/gregoryv/asserter/branch/master/graph/badge.svg)](https://codecov.io/gh/gregoryv/asserter)\n[![Maintainability](https://api.codeclimate.com/v1/badges/b0001c5ba7cd098b183d/maintainability)](https://codeclimate.com/github/gregoryv/asserter/maintainability)\n\n[asserter](https://godoc.org/github.com/gregoryv/asserter) - Package for oneline assertions\n\nNO LONGER MAINTAINED!!!\n\nAfter some consideration and\nreading\n[Assert Libraries](https://github.com/golang/go/wiki/TestComments#assert-libraries) I've\ndecided to stop using this package and advise you the same.\n\n## Quick start\n\n    go get github.com/gregoryv/asserter\n\nIn your tests\n\n    func Test_something(t *testing.T) {\n        got, err := something()\n\n        assert := asserter.New(t)\n        assert(err == nil).Fatal(err)\n        assert(got == exp).Errorf(\"%v, expected %v\", got, exp)\n\t    // same as\n\t    assert().Equals(got, exp)\n\n        assert().Contains(got, \"text\")\n\t    assert().Contains(got, 1)\n\n\t    // Check readers content\n\t    resp, err := http.Get(\"http://example.com\")\n\t    assert(err == nil).Fatal(err)\n\t    assert().Contains(resp.Body, \"\u003ctitle\u003e\")\n    }\n\n\nHTTP handler specific\n\n    assert := asserter.New(t)\n    exp := assert().ResponseFrom(handler)\n    // io.Reader option means body\n    exp.StatusCode(200, \"POST\", \"/\", strings.NewReader(\"the body\"))\n    // string option means error message\n    exp.StatusCode(200, \"GET\", \"/\", \"should be ok\")\n    // http.Header additional headers\n    exp.StatusCode(200, \"GET\", \"/\", http.Header{\n        \"Content-Type\": []string{\"text/plain\"},\n    })\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryv%2Fasserter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregoryv%2Fasserter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryv%2Fasserter/lists"}