diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b5185ff..a539c1149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ You can silence the RC advertisement by setting an `ACK_GINKG_RC=true` environme ## 1.16.1 ### Fixes -- Supress --stream deprecation warning on windows (#793) +- Suppress --stream deprecation warning on windows (#793) ## 1.16.0 @@ -222,7 +222,7 @@ You can silence the RC advertisement by setting an `ACK_GINKG_RC=true` environme - fix: for `go vet` to pass [69338ec] - docs: fix for contributing instructions [7004cb1] - consolidate and streamline contribution docs (#494) [d848015] -- Make generated Junit file compatable with "Maven Surefire" (#488) [e51bee6] +- Make generated Junit file compatible with "Maven Surefire" (#488) [e51bee6] - all: gofmt [000d317] - Increase eventually timeout to 30s [c73579c] - Clarify asynchronous test behaviour [294d8f4] @@ -334,7 +334,7 @@ Bug Fixes: - Fix incorrect failure message when a panic occurs during a parallel test run - Fixed an issue where a pending test within a focused context (or a focused test within a pending context) would skip all other tests. - Be more consistent about handling SIGTERM as well as SIGINT -- When interupted while concurrently compiling test suites in the background, Ginkgo now cleans up the compiled artifacts. +- When interrupted while concurrently compiling test suites in the background, Ginkgo now cleans up the compiled artifacts. - Fixed a long standing bug where `ginkgo -p` would hang if a process spawned by one of the Ginkgo parallel nodes does not exit. (Hooray!) ## 1.1.0 (8/2/2014) diff --git a/README.md b/README.md index b24250611..58507c36f 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ ginkgo -p By following [established patterns for writing parallel specs](https://onsi.github.io/ginkgo/#patterns-for-parallel-integration-specs) you can build even large, complex integration suites that parallelize cleanly and run performantly. -As your suites grow Ginkgo helps you keep your specs organized with [labels](https://onsi.github.io/ginkgo/#spec-labels) and lets you easily run [subsets of specs](https://onsi.github.io/ginkgo/#filtering-specs), either [programatically](https://onsi.github.io/ginkgo/#focused-specs) or on the [command line](https://onsi.github.io/ginkgo/#combining-filters). And Ginkgo's reporting infrastructure generates machine-readable output in a [variety of formats](https://onsi.github.io/ginkgo/#generating-machine-readable-reports) _and_ allows you to build your own [custom reporting infrastructure](https://onsi.github.io/ginkgo/#generating-reports-programmatically). +As your suites grow Ginkgo helps you keep your specs organized with [labels](https://onsi.github.io/ginkgo/#spec-labels) and lets you easily run [subsets of specs](https://onsi.github.io/ginkgo/#filtering-specs), either [programmatically](https://onsi.github.io/ginkgo/#focused-specs) or on the [command line](https://onsi.github.io/ginkgo/#combining-filters). And Ginkgo's reporting infrastructure generates machine-readable output in a [variety of formats](https://onsi.github.io/ginkgo/#generating-machine-readable-reports) _and_ allows you to build your own [custom reporting infrastructure](https://onsi.github.io/ginkgo/#generating-reports-programmatically). Ginkgo ships with `ginkgo`, a [command line tool](https://onsi.github.io/ginkgo/#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. diff --git a/config/deprecated.go b/config/deprecated.go index 67b351a08..a61021d08 100644 --- a/config/deprecated.go +++ b/config/deprecated.go @@ -49,21 +49,21 @@ type DeprecatedDefaultReporterConfigType struct { } // Sadly there is no way to gracefully deprecate access to these global config variables. -// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguraiton() method +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method // These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails type GinkgoConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead struct{} // Sadly there is no way to gracefully deprecate access to these global config variables. -// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguraiton() method +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method // These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails var GinkgoConfig = GinkgoConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead{} // Sadly there is no way to gracefully deprecate access to these global config variables. -// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguraiton() method +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method // These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails type DefaultReporterConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead struct{} // Sadly there is no way to gracefully deprecate access to these global config variables. -// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguraiton() method +// Users who need access to Ginkgo's configuration should use the DSL's GinkgoConfiguration() method // These new unwieldy type names exist to give users a hint when they try to compile and the compilation fails var DefaultReporterConfig = DefaultReporterConfigIsNoLongerAccessibleFromTheConfigPackageUseTheDSLsGinkgoConfigurationFunctionInstead{} diff --git a/core_dsl.go b/core_dsl.go index 3524a39c6..ab9fc26e7 100644 --- a/core_dsl.go +++ b/core_dsl.go @@ -115,7 +115,7 @@ The first return value is the SuiteConfig which controls aspects of how the suit the second return value is the ReporterConfig which controls aspects of how Ginkgo's default reporter emits output. -Mutating the returned configurations has no effect. To reconfigure Ginkgo programatically you need +Mutating the returned configurations has no effect. To reconfigure Ginkgo programmatically you need to pass in your mutated copies into RunSpecs(). You can learn more at https://onsi.github.io/ginkgo/#overriding-ginkgos-command-line-configuration-in-the-suite @@ -184,7 +184,7 @@ If you bootstrapped your suite with "ginkgo bootstrap" this is already done for you. Ginkgo is typically configured via command-line flags. This configuration -can be overriden, however, and passed into RunSpecs as optional arguments: +can be overridden, however, and passed into RunSpecs as optional arguments: func TestMySuite(t *testing.T) { RegisterFailHandler(gomega.Fail) diff --git a/docs/MIGRATING_TO_V2.md b/docs/MIGRATING_TO_V2.md index a3fbf3318..0cc6ae258 100644 --- a/docs/MIGRATING_TO_V2.md +++ b/docs/MIGRATING_TO_V2.md @@ -40,7 +40,7 @@ The next sections describe the [new features in Ginkgo 2.0](#major-additions-and ### Interrupt Behavior Interrupt behavior is substantially improved, sending an interrupt signal will now: - immediately cause the current test to unwind. Ginkgo will run any `AfterEach` blocks, then immediately skip all remaining tests, then run the `AfterSuite` block. - - emit information about which node Ginkgo was running when the interrupt signal was recevied. + - emit information about which node Ginkgo was running when the interrupt signal was received. - emit as much information as possible about the interrupted test (e.g. `GinkgoWriter` contents, `stdout` and `stderr` context). - emit a stack trace of every running goroutine at the moment of interruption. @@ -245,7 +245,7 @@ Ginkgo V2 provides an improved reporting infrastructure that [replaces and impro #### Generating machine-readable reports Ginkgo now natively supports generating and aggregating reports in a number of machine-readable formats - and these reports can be generated and managed by simply passing `ginkgo` command line flags. -Ginkgo V2 introduces a new JSON format that faithfully captures all avialable information about a Ginkgo test suite. JSON reports can be generated via `ginkgo --json-report=out.json`. The resulting JSON file encodes an array of `types.Report`. Each entry in that array lists detailed information about the test suite and includes a list of `types.SpecReport` that captures detailed information about each spec. These types are documented [here](https://github.com/onsi/ginkgo/blob/ver2/types/types.go). +Ginkgo V2 introduces a new JSON format that faithfully captures all available information about a Ginkgo test suite. JSON reports can be generated via `ginkgo --json-report=out.json`. The resulting JSON file encodes an array of `types.Report`. Each entry in that array lists detailed information about the test suite and includes a list of `types.SpecReport` that captures detailed information about each spec. These types are documented [here](https://github.com/onsi/ginkgo/blob/ver2/types/types.go). Ginkgo also supports generating JUnit reports with `ginkgo --junit-report=out.xml` and Teamcity reports with `ginkgo --teamcity-report=out.teamcity`. In addition, Ginkgo V2's JUnit reporter has been improved and is now more conformant with the JUnit specification. @@ -377,7 +377,7 @@ When generating profiles for `-cpuprofile=FILE`, `-blockprofile=FILE`, `-memprof Coverage reporting is much improved in 2.0: - `ginkgo -cover -p` now emits code coverage after the test completes, just like `ginkgo -cover` does in series. -- When running across mulitple packages (e.g. `ginkgo -r -cover`) ginkgo will now emit a composite coverage statistic that represents the total coverage across all test suites run. (Note that this is disabled if you set `-keep-separate-coverprofiles`). +- When running across multiple packages (e.g. `ginkgo -r -cover`) ginkgo will now emit a composite coverage statistic that represents the total coverage across all test suites run. (Note that this is disabled if you set `-keep-separate-coverprofiles`). In addition, Ginkgo now follows the following rules when generating cover profiles using `-cover` and/or `-coverprofile=FILE`: @@ -410,7 +410,7 @@ In V1 Ginkgo would run windows tests in parallel with the `--stream` option. Th - Ginkgo's OutputInterceptor (the component that intercepts stdout/stderr when running in parallel) should now be more performant and better handle edge cases. It can be paused and resumed with PauseOutputInterception() and ResumeOutputInterception() and disabled entirely with --output-interceptor-mode=none. ## Major Changes -These are major changes that will need user intervention to migrate succesfully. +These are major changes that will need user intervention to migrate successfully. ### Removed: Async Testing As described in the [Ginkgo 2.0 Proposal](https://docs.google.com/document/d/1h28ZknXRsTLPNNiOjdHIO-F2toCzq4xoZDXbfYaBdoQ/edit#heading=h.mzgqmkg24xoo) the Ginkgo 1.x implementation of asynchronous testing using a `Done` channel was a confusing source of test-pollution. It is removed in Ginkgo 2.0. @@ -474,7 +474,7 @@ Alternatively, you can use the new `--json-report` flag to produce a machine rea Finally, if you still need the real-time reporting capabilities that 1.X's custom reporters provided you can use [`ReportBeforeEach` and `ReportAfterEach`](#capturing-report-information-about-each-spec-as-the-test-suite-runs) to get information about each spec as it completes. ### Changed: First-class Support for Table Testing -The table extension has been moved into the core Ginkgo DSL and the table functionality has been improved while maintaining backward compatibility. Users no longer need to `import "github.com/onsi/ginkgo/v2/extenstions/table"`. Instead the table DSL is automatically pulled in by importing `"github.com/onsi/ginkgo/v2"`. +The table extension has been moved into the core Ginkgo DSL and the table functionality has been improved while maintaining backward compatibility. Users no longer need to `import "github.com/onsi/ginkgo/v2/extensions/table"`. Instead the table DSL is automatically pulled in by importing `"github.com/onsi/ginkgo/v2"`. #### Migration Strategy: Remove `"github.com/onsi/ginkgo/v2/extensions/table` imports. Code that was dot-importing both Ginkgo and the table extension should automatically work. If you were not dot-importing you will need to replace references to `table.DescribeTable` and `table.Entry` with `ginkgo.DescribeTable` and `ginkgo.Entry`. @@ -496,7 +496,7 @@ V1 also allowed mutating the global config objects which could lead to strange b #### Migration Strategy: Instead, configuration can be accessed using the DSL's `GinkgoConfiguration()` function. This will return a `types.SuiteConfig` and `types.ReporterConfig`. Users generally don't need to access this configuration - the most commonly used fields by end users are already made available via `GinkgoRandomSeed()` and `GinkgoParallelProcess()`. -It is generally recommended that users use the CLI to configure Ginkgo as some aspects of configuration must apply to the CLI as well as the suite under tests - nonetheless there are contexts where it is necessary to change Ginkgo's configuration programatically. V2 supports this by allowing users to pass updated configuration into `RunSpecs`: +It is generally recommended that users use the CLI to configure Ginkgo as some aspects of configuration must apply to the CLI as well as the suite under tests - nonetheless there are contexts where it is necessary to change Ginkgo's configuration programmatically. V2 supports this by allowing users to pass updated configuration into `RunSpecs`: ```go func TestMySuite(t *testing.T) { @@ -579,7 +579,7 @@ These are minor changes that will be transparent for most users. - `"top level"` is no longer the first element in `types.SpecReport.NodeTexts`. This will only affect users who write custom reporters. -- The output format of Ginkgo's Default Reporter has changed in numerous subtle ways to improve readability and the user experience. Users who were scraping Ginkgo output programatically may need to change their scripts or use the new JSON formatted report option. +- The output format of Ginkgo's Default Reporter has changed in numerous subtle ways to improve readability and the user experience. Users who were scraping Ginkgo output programmatically may need to change their scripts or use the new JSON formatted report option. - When running in series and verbose mode (i.e. `ginkgo -v`) GinkgoWriter output is emitted in real-time (existing behavior) but also emitted in the failure message for failed tests. This allows for consistent failure messages regardless of verbosity settings and also makes it possible for the resulting JSON report to include captured GinkgoWriter information. @@ -666,7 +666,7 @@ This _also_ means that you can, in principle, upgrade different test suites in y ### A symbol in V2 now clashes with a symbol in my codebase. What do I do? If Ginkgo 2.0 introduces a new exported symbl that now clashes with your codebase (because you are dot-importing Ginkgo). Check out the [Alternatives to Dot-Importing Ginkgo](https://onsi.github.io/ginkgo/#alternatives-to-dot-importing-ginkgo) section of the documentation for some options. You may be able to, instead, dot-import just a subset of the Ginkgo DSL using the new `github.com/onsi/ginkgo/v2/dsl` set of packages. -Specificaly when upgrading from v1 to v2 if you see a dot-import clash due to a newly introduced symbol (e.g. the new `Label` decorator) you can instead choose to dot-import the core DSL and import the `decorator` dsl separately: +Specifically when upgrading from v1 to v2 if you see a dot-import clash due to a newly introduced symbol (e.g. the new `Label` decorator) you can instead choose to dot-import the core DSL and import the `decorator` dsl separately: ```go import ( diff --git a/docs/index.md b/docs/index.md index 55595f68a..0bdf44886 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1512,7 +1512,7 @@ Will generate entries named: `1 + 2 = 3`, `-1 + 2 = 1`, `zeros`, `110 = 10 + 100 ### Alternatives to Dot-Importing Ginkgo -As shown througout this documentation, Ginkgo users are encouraged to dot-import the Ginkgo DSL into their test suites to effectively extend the Go language with Ginkgo's expressive building blocks: +As shown throughout this documentation, Ginkgo users are encouraged to dot-import the Ginkgo DSL into their test suites to effectively extend the Go language with Ginkgo's expressive building blocks: ```go import . "github.com/onsi/ginkgo/v2" @@ -2154,7 +2154,7 @@ BeforeEach(func() { }) ``` -now, every spec will be guaranteed to start with the same initial state and we are free to write our specs without worrying about spec polution. +now, every spec will be guaranteed to start with the same initial state and we are free to write our specs without worrying about spec pollution. This behavior, however, will cause specs in Ordered containers to break. Consider this set of specs: @@ -2893,7 +2893,7 @@ When running in CI you'll want to make sure that the version of the `ginkgo` CLI `go run github.com/onsi/ginkgo/v2/ginkgo` -This alone, however, is often not enought. The Ginkgo CLi includes additional dependencies that aren't part of the Ginkgo library - since your code doesn't import the cli these dependencies probably aren't in your `go.sum` file. To get around this it is idiomatic Go to introduce a `tools.go` file. This can go anywhere in your module - for example, Gomega places its `tools.go` at the top-level. Your `tools.go` file should look like: +This alone, however, is often not enough. The Ginkgo CLi includes additional dependencies that aren't part of the Ginkgo library - since your code doesn't import the cli these dependencies probably aren't in your `go.sum` file. To get around this it is idiomatic Go to introduce a `tools.go` file. This can go anywhere in your module - for example, Gomega places its `tools.go` at the top-level. Your `tools.go` file should look like: ```go //go:build tools @@ -3264,7 +3264,7 @@ var _ = BeforeSuite(func() { Describe("Storing and retrieving the book fixtures", func() { for _, book := range fixtureBooks { book := book - It(fmt.Sprintf("can store and retreive %s", book.Title), func() { + It(fmt.Sprintf("can store and retrieve %s", book.Title), func() { Expect(library.Store(book)).To(Succeed()) DeferCleanup(library.Delete, book) Expect(library.FindByTitle(book.Title)).To(Equal(book)) @@ -4500,7 +4500,7 @@ The columns are: - Focused (bool): True, if focused. (Conforms to the rules in [Focused Specs](#focused-specs).) - Pending (bool): True, if pending. (Conforms to the rules in [Pending Specs](#pending-specs).) -You can set a different output format with the `-format` flag. Accepted formats are `csv`, `indent`, and `json`. The `ident` format is like `csv`, but uses identation to show the nesting of containers and specs. Both the `csv` and `json` formats can be read by another program, e.g., an editor plugin that displays a tree view of Ginkgo tests in a file, or presents a menu for the user to quickly navigate to a container or spec. +You can set a different output format with the `-format` flag. Accepted formats are `csv`, `indent`, and `json`. The `ident` format is like `csv`, but uses indentation to show the nesting of containers and specs. Both the `csv` and `json` formats can be read by another program, e.g., an editor plugin that displays a tree view of Ginkgo tests in a file, or presents a menu for the user to quickly navigate to a container or spec. `ginkgo outline` is intended for integration with third-party libraries and applications. If you simply want to know how a suite will run without running it try `ginkgo -v --dry-run` instead. @@ -4584,7 +4584,7 @@ var _ = Describe("Consumer", func() { Since `GinkgoT()` implements `Cleanup()` (using `DeferCleanup()` under the hood) Gomock will automatically register a call to `mockCtrl.Finish()` when the controller is created. -When using Gomock you may want to run `ginkgo` with the `-trace` flag to print out stack traces for failures which will help you trace down where, in your code, invalid calls occured. +When using Gomock you may want to run `ginkgo` with the `-trace` flag to print out stack traces for failures which will help you trace down where, in your code, invalid calls occurred. ### IDE Support Ginkgo works best from the command-line, and [`ginkgo watch`](#watching-for-changes) makes it easy to rerun tests on the command line whenever changes are detected. diff --git a/ginkgo/generators/bootstrap_command.go b/ginkgo/generators/bootstrap_command.go index 8618c14c1..0273abe9c 100644 --- a/ginkgo/generators/bootstrap_command.go +++ b/ginkgo/generators/bootstrap_command.go @@ -40,7 +40,7 @@ func BuildBootstrapCommand() command.Command { ShortDoc: "Bootstrap a test suite for the current package", Documentation: `Tests written in Ginkgo and Gomega require a small amount of boilerplate to hook into Go's testing infrastructure. -{{bold}}ginkgo boostrap{{/}} generates this boilerplate for you in a file named X_suite_test.go where X is the name of the package under test.`, +{{bold}}ginkgo bootstrap{{/}} generates this boilerplate for you in a file named X_suite_test.go where X is the name of the package under test.`, DocLink: "generators", Flags: flags, Command: func(_ []string, _ []string) { diff --git a/ginkgo/generators/generate_command.go b/ginkgo/generators/generate_command.go index 9ad88232c..33a1b6798 100644 --- a/ginkgo/generators/generate_command.go +++ b/ginkgo/generators/generate_command.go @@ -41,7 +41,7 @@ func BuildGenerateCommand() command.Command { Name: "generate", Usage: "ginkgo generate ", ShortDoc: "Generate a test file named _test.go", - Documentation: `If the optional argument is ommitted, a file named after the package in the current direcotry will be created. + Documentation: `If the optional argument is omitted, a file named after the package in the current directory will be created. You can pass multiple to generate multiple files simultaneously. The resulting files are named _test.go. diff --git a/ginkgo/generators/generators_common.go b/ginkgo/generators/generators_common.go index f1c8e5805..9da13a0d3 100644 --- a/ginkgo/generators/generators_common.go +++ b/ginkgo/generators/generators_common.go @@ -17,7 +17,7 @@ type GeneratorsConfig struct { func getPackageAndFormattedName() (string, string, string) { path, err := os.Getwd() - command.AbortIfError("Could not get current working diretory:", err) + command.AbortIfError("Could not get current working directory:", err) dirName := strings.Replace(filepath.Base(path), "-", "_", -1) dirName = strings.Replace(dirName, " ", "_", -1) diff --git a/ginkgo/internal/run.go b/ginkgo/internal/run.go index 5f8d387dc..ae7503de1 100644 --- a/ginkgo/internal/run.go +++ b/ginkgo/internal/run.go @@ -188,7 +188,7 @@ func runParallel(suite TestSuite, ginkgoConfig types.SuiteConfig, reporterConfig } args, err := types.GenerateGinkgoTestRunArgs(procGinkgoConfig, reporterConfig, procGoFlagsConfig) - command.AbortIfError("Failed to generate test run argumnets", err) + command.AbortIfError("Failed to generate test run arguments", err) args = append([]string{"--test.timeout=0"}, args...) args = append(args, additionalArgs...) diff --git a/integration/_fixtures/fail_fixture/fail_fixture_test.go b/integration/_fixtures/fail_fixture/fail_fixture_test.go index f1032be3d..d9feac609 100644 --- a/integration/_fixtures/fail_fixture/fail_fixture_test.go +++ b/integration/_fixtures/fail_fixture/fail_fixture_test.go @@ -10,7 +10,7 @@ var _ = It("handles top level failures", func() { println("NEVER SEE THIS") }) -var _ = Describe("Excercising different failure modes", func() { +var _ = Describe("Exercising different failure modes", func() { It("synchronous failures", func() { Ω("a sync failure").Should(Equal("nope")) println("NEVER SEE THIS") diff --git a/integration/_fixtures/skip_fixture/skip_fixture_test.go b/integration/_fixtures/skip_fixture/skip_fixture_test.go index 0eec39e1b..bbf4db526 100644 --- a/integration/_fixtures/skip_fixture/skip_fixture_test.go +++ b/integration/_fixtures/skip_fixture/skip_fixture_test.go @@ -10,7 +10,7 @@ var _ = It("handles top level skips", func() { println("NEVER SEE THIS") }) -var _ = Describe("Excercising different skip modes", func() { +var _ = Describe("Exercising different skip modes", func() { It("synchronous skip", func() { Skip("a sync SKIP") println("NEVER SEE THIS") diff --git a/integration/flags_test.go b/integration/flags_test.go index 0eb15130e..e56875de8 100644 --- a/integration/flags_test.go +++ b/integration/flags_test.go @@ -155,7 +155,7 @@ var _ = Describe("Flags Specs", func() { It("should allow configuration overrides", func() { fm.MountFixture("config_override") session := startGinkgo(fm.PathTo("config_override"), "--label-filter=NORUN", "--no-color") - Eventually(session).Should(gexec.Exit(0), "Succeeds because --label-filter is overriden by the test suite itself.") + Eventually(session).Should(gexec.Exit(0), "Succeeds because --label-filter is overridden by the test suite itself.") output := string(session.Out.Contents()) Ω(output).Should(ContainSubstring("2 Specs")) Ω(output).Should(ContainSubstring("1 Skipped")) diff --git a/integration/output_interceptor_test.go b/integration/output_interceptor_test.go index 984e85a3f..951c882eb 100644 --- a/integration/output_interceptor_test.go +++ b/integration/output_interceptor_test.go @@ -9,7 +9,7 @@ import ( ) var _ = Describe("OutputInterceptor", func() { - Context("excercising the edge case reported in issue #851", func() { + Context("exercising the edge case reported in issue #851", func() { BeforeEach(func() { fm.MountFixture("interceptor") diff --git a/integration/profiling_test.go b/integration/profiling_test.go index 697d53583..65a860402 100644 --- a/integration/profiling_test.go +++ b/integration/profiling_test.go @@ -83,7 +83,7 @@ var _ = Describe("Profiling Specs", func() { } Context("when running a single package in series or in parallel with -cover", func() { - It("emits the coverage pecentage and generates a cover profile", func() { + It("emits the coverage percentage and generates a cover profile", func() { seriesSession := startGinkgo(fm.PathTo("coverage"), "--no-color", "-cover") Eventually(seriesSession).Should(gexec.Exit(0)) Ω(seriesSession.Out).Should(gbytes.Say(`coverage: 80\.0% of statements`)) diff --git a/internal/failer_test.go b/internal/failer_test.go index bb573555d..41a8aa936 100644 --- a/internal/failer_test.go +++ b/internal/failer_test.go @@ -55,7 +55,7 @@ var _ = Describe("Failer", func() { }) Describe("when told to skip", func() { - Context("when no failure has occured", func() { + Context("when no failure has occurred", func() { It("registers the test as skipped", func() { failer.Skip("something skipped", clA) state, failure := failer.Drain() @@ -67,7 +67,7 @@ var _ = Describe("Failer", func() { }) }) - Context("when a failure has already occured", func() { + Context("when a failure has already occurred", func() { BeforeEach(func() { failer.Fail("something failed", clA) }) @@ -85,7 +85,7 @@ var _ = Describe("Failer", func() { }) Describe("when told to abort", func() { - Context("when no failure has occured", func() { + Context("when no failure has occurred", func() { It("registers the test as aborted", func() { failer.AbortSuite("something aborted", clA) state, failure := failer.Drain() @@ -97,7 +97,7 @@ var _ = Describe("Failer", func() { }) }) - Context("when a failure has already occured", func() { + Context("when a failure has already occurred", func() { BeforeEach(func() { failer.Fail("something failed", clA) }) diff --git a/internal/focus_test.go b/internal/focus_test.go index 30bb9b7a8..5ac30bb0e 100644 --- a/internal/focus_test.go +++ b/internal/focus_test.go @@ -215,7 +215,7 @@ var _ = Describe("Focus", func() { BeforeEach(func() { specs = Specs{ S(N(CL("file_a", 1))), //include because "file_:1" is in FocusFiles - S(N(CL("file_b", 3, "file_b", 15))), //include becasue "file_:15-21" is in FocusFiles + S(N(CL("file_b", 3, "file_b", 15))), //include because "file_:15-21" is in FocusFiles S(N(CL("file_b", 17))), //skip because "_b:17" is in SkipFiles S(N(CL("file_b", 20), Pending)), //skip because spec is flagged pending S(N(CL("c", 3), Focus)), //skip because "c" is not in FocusFiles - override programmatic focus diff --git a/internal/internal_integration/report_after_suite_test.go b/internal/internal_integration/report_after_suite_test.go index a61d11989..5c7cc1280 100644 --- a/internal/internal_integration/report_after_suite_test.go +++ b/internal/internal_integration/report_after_suite_test.go @@ -148,7 +148,7 @@ var _ = Describe("Sending reports to ReportAfterSuite procs", func() { Ω(success).Should(BeFalse()) }) - It("ignores the interrupt and soliders on", func() { + It("ignores the interrupt and soldiers on", func() { Ω(rt).Should(HaveTracked( "before-suite", "A", "B", "C", diff --git a/internal/internal_integration/synchronized_suite_nodes_test.go b/internal/internal_integration/synchronized_suite_nodes_test.go index a94647957..7f1b3eb3d 100644 --- a/internal/internal_integration/synchronized_suite_nodes_test.go +++ b/internal/internal_integration/synchronized_suite_nodes_test.go @@ -88,7 +88,7 @@ var _ = Describe("Synchronized Suite Nodes", func() { Ω(success).Should(BeFalse()) }) - It("doens't run the allProcs function or any of the tests", func() { + It("doesn't run the allProcs function or any of the tests", func() { Ω(rt).Should(HaveTracked( "before-suite-proc-1", "after-suite-all-procs", "after-suite-proc-1", diff --git a/internal/ordering.go b/internal/ordering.go index f4723a54c..161be820c 100644 --- a/internal/ordering.go +++ b/internal/ordering.go @@ -12,7 +12,7 @@ type SpecIndices []int func OrderSpecs(specs Specs, suiteConfig types.SuiteConfig) (GroupedSpecIndices, GroupedSpecIndices) { /* - Ginkgo has sophisticated suport for randomizing specs. Specs are guaranteed to have the same + Ginkgo has sophisticated support for randomizing specs. Specs are guaranteed to have the same order for a given seed across test runs. By default only top-level containers and specs are shuffled - this makes for a more intuitive debugging diff --git a/internal/output_interceptor.go b/internal/output_interceptor.go index 6f7c386cc..b59918a81 100644 --- a/internal/output_interceptor.go +++ b/internal/output_interceptor.go @@ -29,7 +29,7 @@ You have several options to fix this. In preferred order they are: 2. Ensure your process exits before the current spec completes. If your process is long-lived and must cross spec boundaries, this option won't work for you. -3. Pause Ginkgo's output interceptor befor starting your process and then +3. Pause Ginkgo's output interceptor before starting your process and then resume it after. Use PauseOutputInterception() and ResumeOutputInterception() to do this. 4. Set --output-interceptor-mode=none when running your Ginkgo suite. This will @@ -192,7 +192,7 @@ func (interceptor *genericOutputInterceptor) PauseIntercepting() { should eventually receive an EOF and exit. **However**, if the user has spun up an external process and passed in os.Stdout/os.Stderr to cmd.Stdout/cmd.Stderr then the external process - will have a file descriptor pointing to the pipe writer's file desription and it will not close until the external process exits. + will have a file descriptor pointing to the pipe writer's file description and it will not close until the external process exits. That would leave us hanging here waiting for the io.Copy to close forever. Instead we invoke this emergency escape valve. This returns whatever content we've got but leaves the io.Copy running. This ensures the external process can continue writing without hanging at the cost of leaking a goroutine diff --git a/internal/spec_test.go b/internal/spec_test.go index 0916ae1df..2d0d26dac 100644 --- a/internal/spec_test.go +++ b/internal/spec_test.go @@ -10,8 +10,8 @@ var _ = Describe("Spec and Specs", func() { Describe("spec.Text", func() { Context("when the spec has nodes with texts", func() { It("returns the concatenated texts of its nodes (omitting any empty texts)", func() { - spec := S(N(), N("Oh death,"), N(), N("where is"), N("thy"), N(), N("sting?")) - Ω(spec.Text()).Should(Equal("Oh death, where is thy sting?")) + spec := S(N(), N("Oh death,"), N(), N("where is"), N("thy"), N(), N("string?")) + Ω(spec.Text()).Should(Equal("Oh death, where is thy string?")) }) }) diff --git a/internal/suite.go b/internal/suite.go index 8b0d68ce9..6913d4093 100644 --- a/internal/suite.go +++ b/internal/suite.go @@ -296,7 +296,7 @@ func (suite *Suite) runSpecs(description string, suiteLabels Labels, suitePath s // the complexity for running groups of specs is very high because of Ordered containers and FlakeAttempts // we encapsulate that complexity in the notion of a Group that can run // Group is really just an extension of suite so it gets passed a suite and has access to all its internals - // Note that group is stateful and intedned for single use! + // Note that group is stateful and intended for single use! newGroup(suite).run(specs.AtIndices(groupedSpecIndices[groupedSpecIdx])) } diff --git a/internal/suite_test.go b/internal/suite_test.go index b04cf9f9b..3281f5a5b 100644 --- a/internal/suite_test.go +++ b/internal/suite_test.go @@ -95,7 +95,7 @@ var _ = Describe("Suite", func() { }) - Context("when the user attemps to fail during PhaseBuildTree", func() { + Context("when the user attempts to fail during PhaseBuildTree", func() { BeforeEach(func() { suite.PushNode(N(ntCon, "a top-level container", func() { failer.Fail("boom", cl) diff --git a/reporters/junit_report.go b/reporters/junit_report.go index 87556d03c..febcc650b 100644 --- a/reporters/junit_report.go +++ b/reporters/junit_report.go @@ -41,7 +41,7 @@ type JUnitTestSuites struct { type JUnitTestSuite struct { // Name maps onto the description of the test suite - maps onto Report.SuiteDescription Name string `xml:"name,attr"` - // Package maps onto the aboslute path to the test suite - maps onto Report.SuitePath + // Package maps onto the absolute path to the test suite - maps onto Report.SuitePath Package string `xml:"package,attr"` // Tests maps onto the total number of specs in the test suite (this includes any suite nodes such as BeforeSuite) Tests int `xml:"tests,attr"` @@ -110,7 +110,7 @@ type JUnitSkipped struct { } type JUnitError struct { - //Message maps onto the panic/exception thrown - equivalent to SpecReport.Failure.ForwardedPanic - or to "interupted" + //Message maps onto the panic/exception thrown - equivalent to SpecReport.Failure.ForwardedPanic - or to "interrupted" Message string `xml:"message,attr"` //Type is one of "panicked" or "interrupted" Type string `xml:"type,attr"` diff --git a/reporting_dsl.go b/reporting_dsl.go index b35a6ed84..07b4c6122 100644 --- a/reporting_dsl.go +++ b/reporting_dsl.go @@ -103,7 +103,7 @@ ReportAftersuite nodes must be created at the top-level (i.e. not nested in a Co When running in parallel, Ginkgo ensures that only one of the parallel nodes runs the ReportAfterSuite and that it is passed a report that is aggregated across all parallel nodes -In addition to using ReportAfterSuite to programatically generate suite reports, you can also generate JSON, JUnit, and Teamcity formatted reports using the --json-report, --junit-report, and --teamcity-report ginkgo CLI flags. +In addition to using ReportAfterSuite to programmatically generate suite reports, you can also generate JSON, JUnit, and Teamcity formatted reports using the --json-report, --junit-report, and --teamcity-report ginkgo CLI flags. You cannot nest any other Ginkgo nodes within a ReportAfterSuite node's closure. You can learn more about ReportAfterSuite here: https://onsi.github.io/ginkgo/#generating-reports-programmatically diff --git a/types/config.go b/types/config.go index 8ebd329e8..07ef4c3a7 100644 --- a/types/config.go +++ b/types/config.go @@ -168,7 +168,7 @@ func (g CLIConfig) ComputedNumCompilers() int { } // Configuration for the Ginkgo CLI capturing available go flags -// A subset of Go flags are exposed by Ginkgo. Some are avaiable at compile time (e.g. ginkgo build) and others only at run time (e.g. ginkgo run - which has both build and run time flags). +// A subset of Go flags are exposed by Ginkgo. Some are available at compile time (e.g. ginkgo build) and others only at run time (e.g. ginkgo run - which has both build and run time flags). // More details can be found at: // https://docs.google.com/spreadsheets/d/1zkp-DS4hU4sAJl5eHh1UmgwxCPQhf3s5a8fbiOI8tJU/ type GoFlagsConfig struct { @@ -278,7 +278,7 @@ var SuiteConfigFlags = GinkgoFlags{ Usage: "If set, ginkgo will use the specified output interception strategy when running in parallel. Defaults to dup on unix and swap on windows."}, {KeyPath: "S.LabelFilter", Name: "label-filter", SectionKey: "filter", UsageArgument: "expression", - Usage: "If set, ginkgo will only run specs with labels that match the label-filter. The passed-in expression can include boolean operations (!, &&, ||, ','), groupings via '()', and regular expresions '/regexp/'. e.g. '(cat || dog) && !fruit'"}, + Usage: "If set, ginkgo will only run specs with labels that match the label-filter. The passed-in expression can include boolean operations (!, &&, ||, ','), groupings via '()', and regular expressions '/regexp/'. e.g. '(cat || dog) && !fruit'"}, {KeyPath: "S.FocusStrings", Name: "focus", SectionKey: "filter", Usage: "If set, ginkgo will only run specs that match this regular expression. Can be specified multiple times, values are ORed."}, {KeyPath: "S.SkipStrings", Name: "skip", SectionKey: "filter", @@ -555,7 +555,7 @@ var GoRunFlags = GinkgoFlags{ } // VetAndInitializeCLIAndGoConfig validates that the Ginkgo CLI's configuration is sound -// It returns a potentially mutated copy of the config that rationalizes the configuraiton to ensure consistency for downstream consumers +// It returns a potentially mutated copy of the config that rationalizes the configuration to ensure consistency for downstream consumers func VetAndInitializeCLIAndGoConfig(cliConfig CLIConfig, goFlagsConfig GoFlagsConfig) (CLIConfig, GoFlagsConfig, []error) { errors := []error{} diff --git a/types/config_test.go b/types/config_test.go index 8932ac775..330b83904 100644 --- a/types/config_test.go +++ b/types/config_test.go @@ -108,7 +108,7 @@ var _ = Describe("Config", func() { }) Context("when all is well", func() { - It("retuns no errors", func() { + It("returns no errors", func() { errors := types.VetConfig(flagSet, suiteConf, repConf) Ω(errors).Should(BeEmpty()) }) diff --git a/types/errors_test.go b/types/errors_test.go index 8cb5946fa..87bbe6687 100644 --- a/types/errors_test.go +++ b/types/errors_test.go @@ -34,12 +34,12 @@ var _ = Describe("GinkgoErrors", func() { types.GinkgoError{ Heading: "Error! Error!", CodeLocation: types.CodeLocation{FileName: "foo.go", LineNumber: 17}, - Message: "An error occured.\nWelp!", + Message: "An error occurred.\nWelp!", DocLink: "the-doc-section", }, "{{bold}}{{red}}Error! Error!{{/}}", "{{gray}}foo.go:17{{/}}", - " An error occured.", + " An error occurred.", " Welp!", "", " {{bold}}Learn more at:{{/}}", @@ -49,13 +49,13 @@ var _ = Describe("GinkgoErrors", func() { types.GinkgoError{ Heading: "Error! Error!", CodeLocation: types.NewCodeLocation(0), - Message: "An error occured.\nWelp!", + Message: "An error occurred.\nWelp!", DocLink: "the-doc-section", }, "{{bold}}{{red}}Error! Error!{{/}}", "{{light-gray}}CodeLocation: types.NewCodeLocation(0),{{/}}", fmt.Sprintf("{{gray}}%s:%d{{/}}", types.NewCodeLocation(0).FileName, types.NewCodeLocation(0).LineNumber-6), - " An error occured.", + " An error occurred.", " Welp!", "", " {{bold}}Learn more at:{{/}}", diff --git a/types/flags.go b/types/flags.go index 7d8a73fec..9186ae873 100644 --- a/types/flags.go +++ b/types/flags.go @@ -121,7 +121,7 @@ func NewAttachedGinkgoFlagSet(flagSet *flag.FlagSet, flags GinkgoFlags, bindings func bindFlagSet(f GinkgoFlagSet, flagSet *flag.FlagSet) (GinkgoFlagSet, error) { if flagSet == nil { f.flagSet = flag.NewFlagSet("", flag.ContinueOnError) - //supress all output as Ginkgo is reponsible for formatting usage + //suppress all output as Ginkgo is responsible for formatting usage f.flagSet.SetOutput(io.Discard) } else { f.flagSet = flagSet diff --git a/types/report_entry.go b/types/report_entry.go index a85281a4f..c64866c60 100644 --- a/types/report_entry.go +++ b/types/report_entry.go @@ -42,7 +42,7 @@ func (rev ReportEntryValue) String() string { } func (rev ReportEntryValue) MarshalJSON() ([]byte, error) { - //All this to capture the representaiton at encoding-time, not creating time + //All this to capture the representation at encoding-time, not creating time //This way users can Report on pointers and get their final values at reporting-time out := struct { AsJSON string diff --git a/types/types.go b/types/types.go index 42b5644cb..f30d23c66 100644 --- a/types/types.go +++ b/types/types.go @@ -22,10 +22,10 @@ type Report struct { //SuiteSucceeded captures the success or failure status of the test run //If true, the test run is considered successful. - //If false, the test run is considered unsucccessful + //If false, the test run is considered unsuccessful SuiteSucceeded bool - //SuiteHasProgrammaticFocus captures whether the test suite has a test or set of tests that are programatically focused + //SuiteHasProgrammaticFocus captures whether the test suite has a test or set of tests that are programmatically focused //(i.e an `FIt` or an `FDescribe` SuiteHasProgrammaticFocus bool @@ -365,7 +365,7 @@ type Failure struct { // Message - the failure message passed into Fail(...). When using a matcher library // like Gomega, this will contain the failure message generated by Gomega. // - // Message is also populated if hte user has called Skip(...). + // Message is also populated if the user has called Skip(...). Message string // Location - the CodeLocation where the failure occurred @@ -376,10 +376,10 @@ type Failure struct { // then ForwardedPanic will be populated with a string representation of the captured panic. ForwardedPanic string `json:",omitempty"` - // FailureNodeContext - one of three contexts describing the node in which the failure occured: - // FailureNodeIsLeafNode means the failure occured in the leaf node of the associated SpecReport. None of the other FailureNode fields will be populated - // FailureNodeAtTopLevel means the failure occured in a non-leaf node that is defined at the top-level of the spec (i.e. not in a container). FailureNodeType and FailureNodeLocation will be populated. - // FailureNodeInContainer means the failure occured in a non-leaf node that is defined within a container. FailureNodeType, FailureNodeLocaiton, and FailureNodeContainerIndex will be populated. + // FailureNodeContext - one of three contexts describing the node in which the failure occurred: + // FailureNodeIsLeafNode means the failure occurred in the leaf node of the associated SpecReport. None of the other FailureNode fields will be populated + // FailureNodeAtTopLevel means the failure occurred in a non-leaf node that is defined at the top-level of the spec (i.e. not in a container). FailureNodeType and FailureNodeLocation will be populated. + // FailureNodeInContainer means the failure occurred in a non-leaf node that is defined within a container. FailureNodeType, FailureNodeLocaiton, and FailureNodeContainerIndex will be populated. // // FailureNodeType will contain the NodeType of the node in which the failure occurred. // FailureNodeLocation will contain the CodeLocation of the node in which the failure occurred. diff --git a/types/types_test.go b/types/types_test.go index 4b66a4168..3a6072ef9 100644 --- a/types/types_test.go +++ b/types/types_test.go @@ -149,7 +149,7 @@ var _ = Describe("Types", func() { }) }) - Context("wtih only StdOutErr output", func() { + Context("with only StdOutErr output", func() { It("returns that output", func() { Ω(types.SpecReport{ CapturedStdOutErr: "hello", @@ -157,7 +157,7 @@ var _ = Describe("Types", func() { }) }) - Context("wtih only GinkgoWriter output", func() { + Context("with only GinkgoWriter output", func() { It("returns that output", func() { Ω(types.SpecReport{ CapturedGinkgoWriterOutput: "hello", @@ -285,7 +285,7 @@ var _ = Describe("Types", func() { BeforeEach(func() { report.Failure = types.Failure{} }) - It("round-trips correclty and doesn't include the Failure struct", func() { + It("round-trips correctly and doesn't include the Failure struct", func() { marshalled, err := json.Marshal(report) Ω(string(marshalled)).ShouldNot(ContainSubstring("Failure")) Ω(err).ShouldNot(HaveOccurred())