{"id":28899345,"url":"https://github.com/alexbyk/ftest","last_synced_at":"2025-10-08T04:41:36.229Z","repository":{"id":57488785,"uuid":"112787299","full_name":"alexbyk/ftest","owner":"alexbyk","description":"ftest - Go  fluent testing library and fluent testing http client","archived":false,"fork":false,"pushed_at":"2018-10-01T02:15:00.000Z","size":271,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T18:13:12.005Z","etag":null,"topics":["go","golang","test","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/alexbyk.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}},"created_at":"2017-12-01T21:11:25.000Z","updated_at":"2024-02-14T13:54:50.000Z","dependencies_parsed_at":"2022-08-29T13:32:04.982Z","dependency_job_id":null,"html_url":"https://github.com/alexbyk/ftest","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/alexbyk/ftest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbyk%2Fftest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbyk%2Fftest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbyk%2Fftest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbyk%2Fftest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexbyk","download_url":"https://codeload.github.com/alexbyk/ftest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbyk%2Fftest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261088358,"owners_count":23107683,"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":["go","golang","test","testing"],"created_at":"2025-06-21T08:09:14.437Z","updated_at":"2025-10-08T04:41:36.222Z","avatar_url":"https://github.com/alexbyk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/alexbyk/ftest.svg?branch=master)](https://travis-ci.org/alexbyk/ftest)\n# About\n\n- `ftest` is a simple and easy to use go testing library with fluent design and exact failure messages.\n- `fclient` is a simple http testing client, based on `ftest`.\n\n# Documentation:\n- [ftest](https://godoc.org/github.com/alexbyk/ftest)\n- [fclient](https://godoc.org/github.com/alexbyk/ftest/fclient)\n\n# Installation\n```\ngo get -u github.com/alexbyk/ftest\n```\n\n# Usage\n## ftest\n```go\nimport (\n  \"testing\"\n\n  \"github.com/alexbyk/ftest\"\n)\n\nfunc TestFoo(t *testing.T) {\n  ftest.New(t).Eq(2, 2).\n    Contains(\"FooBarBaz\", \"Bar\").\n    PanicsSubstr(func() { panic(\"Foo\") }, \"Foo\")\n}\n\n```\n\nYou can also use your own label to group your test:\n```go\nft := ftest.NewLabel(t, \"MyLabel\")\n```\n\n## fclient\n```go\npackage app_test\n\nimport (\n  \"fmt\"\n  \"net/http\"\n  \"testing\"\n\n  \"github.com/alexbyk/ftest/fclient\"\n)\n\ntype MyApp struct{}\n\nfunc (app MyApp) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n  w.Write([]byte(`{\"foo\": \"bar\"}`))\n}\n\nfunc Test_hello(t *testing.T) {\n  app := MyApp{}\n  cl := fclient.New(t, app)\n\n  cl.Get(\"/hello\").CodeEq(200).\n    BodyContains(\"bar\").\n    JSONEq(`{\"foo\":\"bar\"}`)\n\n  // using a response directly\n  res := cl.Get(\"/hello\")\n  fmt.Println(res.Body)\n}\n```\n\n# Copyright\nCopyright 2018, [alexbyk.com](https://alexbyk.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbyk%2Fftest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexbyk%2Fftest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbyk%2Fftest/lists"}