Skip to content

Minimize use of setup/teardown hooks (e.g. before, beforeEach, after, afterEach) #746

Open

Description

@mcmire
  • Keeping the setup for each unit test in the individual test makes it easier to understand what behaviour it is testing. A test should be readable in isolation, without cross-referencing elaborate setup steps.
  • It should be easy for the reader to understand which setup steps the test relies upon.

Activity

  1. changed the title [-]Minimize the use of setup/teardown hooks (e.g. , , , )[/-] [+]Go through tests and minimize use of setup/teardown hooks (e.g. `before`, `beforeEach`, `after`, `afterEach`)[/+] on Mar 23, 2022
  2. changed the title [-]Go through tests and minimize use of setup/teardown hooks (e.g. `before`, `beforeEach`, `after`, `afterEach`)[/-] [+]Minimize use of setup/teardown hooks (e.g. `before`, `beforeEach`, `after`, `afterEach`)[/+] on Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions