Skip to content

Releases: berlin-ab/testsuite

testsuite v1.3.0 - Enforce simplicity

Choose a tag to compare

@berlin-ab berlin-ab released this 02 Oct 22:51

This release:

  • removes nested suites
  • enforces that hooks can only be defined once

Nested suites can lead to confusing state modifications across a large test file, making it difficult for the reader to understand what the current state of the subject under test is deep within the context. Instead, do not allow for nested suites.

Enforce that hooks can only be defined once, to force the definition of the setup/teardown logic to be easy to find and understand.

testsuite v1.2.1 - protected hooks using when

Choose a tag to compare

@berlin-ab berlin-ab released this 30 Aug 05:31

Do not allow hooks to be defined after a subsuite using When() has been defined

testsuite v1.2.0 - protected hooks

Choose a tag to compare

@berlin-ab berlin-ab released this 30 Aug 03:13

Ensure hooks are defined before starting to run tests.

v1.2.0 will panic the test if hooks are defined after starting to run the tests within the suite.

testsuite v1.1.0 - Nested suites

Choose a tag to compare

@berlin-ab berlin-ab released this 27 Aug 17:04

v1.1.0 provides the ability to specify nested suites

func TestExample(t *testing.T) {
	testsuite.New(t, "defines a test suite with setup/teardown", func(s *testsuite.S) {
		s.When("in a context", func(s *testsuite.S) {
			s.Run("it does something in this context", func(t *testing.T) {
				// defines a test using standard *testing.T
			})
		})
	})
}

testsuite v1.0.0

Choose a tag to compare

@berlin-ab berlin-ab released this 26 Aug 20:14

testsuite provides xUnit style test suite setup and teardown behavior
for golang's testing.T library missing from the Go ecosystem:

https://awesome-go.com/testing/

Features

  • SetupSuite/TeardownSuite
  • Setup/Teardown per test
  • Multiple suites per test function
  • Simple abstraction wrapping standard testing.T