[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5112":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":37,"discoverSource":38},5112,"ginkgo","onsi\u002Fginkgo","onsi","A Modern Testing Framework for Go","http:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F",null,"Go",9008,702,99,97,0,1,2,17,4,39.54,"MIT License",false,"master",true,[27,28,29,30,31,32,33],"bdd","bdd-framework","go","golang","test","test-driven-development","testing","2026-06-12 02:01:08","![Ginkgo](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002Fimages\u002Fginkgo.png)\n\n[![test](https:\u002F\u002Fgithub.com\u002Fonsi\u002Fginkgo\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg?branch=master)](https:\u002F\u002Fgithub.com\u002Fonsi\u002Fginkgo\u002Factions?query=workflow%3Atest+branch%3Amaster) | [Ginkgo Docs](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F)\n\n---\n\n# Ginkgo\n\nGinkgo is a mature testing framework for Go designed to help you write expressive specs.  Ginkgo builds on top of Go's `testing` foundation and is complemented by the [Gomega](https:\u002F\u002Fgithub.com\u002Fonsi\u002Fgomega) matcher library.  Together, Ginkgo and Gomega let you express the intent behind your specs clearly:\n\n```go\nimport (\n    . \"github.com\u002Fonsi\u002Fginkgo\u002Fv2\"\n    . \"github.com\u002Fonsi\u002Fgomega\"\n    ...\n)\n\nvar _ = Describe(\"Checking books out of the library\", Label(\"library\"), func() {\n    var library *libraries.Library\n    var book *books.Book\n    var valjean *users.User\n    BeforeEach(func() {\n        library = libraries.NewClient()\n        book = &books.Book{\n            Title: \"Les Miserables\",\n            Author: \"Victor Hugo\",\n        }\n        valjean = users.NewUser(\"Jean Valjean\")\n    })\n\n    When(\"the library has the book in question\", func() {\n        BeforeEach(func(ctx SpecContext) {\n            Expect(library.Store(ctx, book)).To(Succeed())\n        })\n\n        Context(\"and the book is available\", func() {\n            It(\"lends it to the reader\", func(ctx SpecContext) {\n                Expect(valjean.Checkout(ctx, library, \"Les Miserables\")).To(Succeed())\n                Expect(valjean.Books()).To(ContainElement(book))\n                Expect(library.UserWithBook(ctx, book)).To(Equal(valjean))\n            }, SpecTimeout(time.Second * 5))\n        })\n\n        Context(\"but the book has already been checked out\", func() {\n            var javert *users.User\n            BeforeEach(func(ctx SpecContext) {\n                javert = users.NewUser(\"Javert\")\n                Expect(javert.Checkout(ctx, library, \"Les Miserables\")).To(Succeed())\n            })\n\n            It(\"tells the user\", func(ctx SpecContext) {\n                err := valjean.Checkout(ctx, library, \"Les Miserables\")\n                Expect(err).To(MatchError(\"Les Miserables is currently checked out\"))\n            }, SpecTimeout(time.Second * 5))\n\n            It(\"lets the user place a hold and get notified later\", func(ctx SpecContext) {\n                Expect(valjean.Hold(ctx, library, \"Les Miserables\")).To(Succeed())\n                Expect(valjean.Holds(ctx)).To(ContainElement(book))\n\n                By(\"when Javert returns the book\")\n                Expect(javert.Return(ctx, library, book)).To(Succeed())\n\n                By(\"it eventually informs Valjean\")\n                notification := \"Les Miserables is ready for pick up\"\n                Eventually(ctx, valjean.Notifications).Should(ContainElement(notification))\n\n                Expect(valjean.Checkout(ctx, library, \"Les Miserables\")).To(Succeed())\n                Expect(valjean.Books(ctx)).To(ContainElement(book))\n                Expect(valjean.Holds(ctx)).To(BeEmpty())\n            }, SpecTimeout(time.Second * 10))\n        })  \n    })\n\n    When(\"the library does not have the book in question\", func() {\n        It(\"tells the reader the book is unavailable\", func(ctx SpecContext) {\n            err := valjean.Checkout(ctx, library, \"Les Miserables\")\n            Expect(err).To(MatchError(\"Les Miserables is not in the library catalog\"))\n        }, SpecTimeout(time.Second * 5))\n    })\n})\n```\n\nJump to the [docs](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F) to learn more.  It's easy to [bootstrap](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#bootstrapping-a-suite) and start writing your [first specs](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#adding-specs-to-a-suite).\n\nIf you have a question, comment, bug report, feature request, etc. please open a [GitHub issue](https:\u002F\u002Fgithub.com\u002Fonsi\u002Fginkgo\u002Fissues\u002Fnew), or visit the [Ginkgo Slack channel](https:\u002F\u002Fapp.slack.com\u002Fclient\u002FT029RQSE6\u002FCQQ50BBNW).\n\n## Capabilities\n\nWhether writing basic unit specs, complex integration specs, or even performance specs - Ginkgo gives you an expressive Domain-Specific Language (DSL) that will be familiar to users coming from frameworks such as [Quick](https:\u002F\u002Fgithub.com\u002FQuick\u002FQuick), [RSpec](https:\u002F\u002Frspec.info), [Jasmine](https:\u002F\u002Fjasmine.github.io), and [Busted](https:\u002F\u002Flunarmodules.github.io\u002Fbusted\u002F).  This style of testing is sometimes referred to as \"Behavior-Driven Development\" (BDD) though Ginkgo's utility extends beyond acceptance-level testing.\n\nWith Ginkgo's DSL you can use nestable [`Describe`, `Context` and `When` container nodes](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#organizing-specs-with-container-nodes) to help you organize your specs.  [`BeforeEach` and `AfterEach` setup nodes](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#extracting-common-setup-beforeeach) for setup and cleanup.  [`It` and `Specify` subject nodes](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#spec-subjects-it) that hold your assertions. [`BeforeSuite` and `AfterSuite` nodes](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#suite-setup-and-cleanup-beforesuite-and-aftersuite) to prep for and cleanup after a suite... and [much more!](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#writing-specs).\n\nAt runtime, Ginkgo can run your specs in reproducibly [random order](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#spec-randomization) and has sophisticated support for [spec parallelization](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#spec-parallelization).  In fact, running specs in parallel is as easy as\n\n```bash\nginkgo -p\n```\n\nBy following [established patterns for writing parallel specs](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#patterns-for-parallel-integration-specs) you can build even large, complex integration suites that parallelize cleanly and run performantly.  And you don't have to worry about your spec suite hanging or leaving a mess behind - Ginkgo provides a per-node `context.Context` and the capability to interrupt the spec after a set period of time - and then clean up.\n\nAs your suites grow Ginkgo helps you keep your specs organized with [labels](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#spec-labels) and lets you easily run [subsets of specs](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#filtering-specs), either [programmatically](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#focused-specs) or on the [command line](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#combining-filters).  And Ginkgo's reporting infrastructure generates machine-readable output in a [variety of formats](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#generating-machine-readable-reports) _and_ allows you to build your own [custom reporting infrastructure](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#generating-reports-programmatically).\n\nGinkgo ships with `ginkgo`, a [command line tool](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#ginkgo-cli-overview) with support for generating, running, filtering, and profiling Ginkgo suites.  You can even have Ginkgo automatically run your specs when it detects a change with `ginkgo watch`, enabling rapid feedback loops during test-driven development.\n\nAnd that's just Ginkgo!  [Gomega](https:\u002F\u002Fonsi.github.io\u002Fgomega\u002F) brings a rich, mature, family of [assertions and matchers](https:\u002F\u002Fonsi.github.io\u002Fgomega\u002F#provided-matchers) to your suites.  With Gomega you can easily mix [synchronous and asynchronous assertions](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#patterns-for-asynchronous-testing) in your specs.  You can even build your own set of expressive domain-specific matchers quickly and easily by composing Gomega's [existing building blocks](https:\u002F\u002Fonsi.github.io\u002Fginkgo\u002F#building-custom-matchers).\n\nHappy Testing!\n\n## License\n\nGinkgo is MIT-Licensed\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Sponsors\n\nSponsors commit to a [sponsorship](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fonsi) for a year.  If you're an organization that makes use of Ginkgo please consider becoming a sponsor!\n\n\u003Cp style=\"font-size:21px; color:black;\">Browser testing via \n    \u003Ca href=\"https:\u002F\u002Fwww.testmu.ai\u002F\" target=\"_blank\">\n        \u003Cimg src=\"https:\u002F\u002Fassets.testmu.ai\u002Fresources\u002Fimages\u002Flogos\u002Fwhite-logo.png\" style=\"vertical-align: middle;\" width=\"250\" \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n","Ginkgo是一个为Go语言设计的现代化测试框架，旨在帮助开发者编写清晰且富有表现力的测试用例。它基于Go的标准测试库构建，并与Gomega匹配器库结合使用，以提供更加丰富和直观的断言方式。Ginkgo支持BDD（行为驱动开发）风格的测试编写，通过`Describe`、`Context`、`It`等关键字组织测试逻辑，使得测试代码结构化且易于理解。此外，Ginkgo还提供了强大的并行测试执行能力以及对长时间运行测试的支持。此框架非常适合需要进行复杂应用逻辑验证或追求高质量自动化测试的Go项目。","2026-06-11 03:02:36","top_language"]