Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify setup and teardown lifecycle methods #13331

Merged
merged 4 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-25.x/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-26.x/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-27.x/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-28.x/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.0/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.1/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.2/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.3/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('city database has San Juan', () => {

## Scoping

By default, the `beforeAll` and `afterAll` blocks apply to every test in a file. You can also group tests together using a `describe` block. When they are inside a `describe` block, the `beforeAll` and `afterAll` blocks only apply to the tests within that `describe` block.
The top level `before*` and `after*` hooks apply to every test in a file. The hooks declared inside a `describe` block apply only to the tests within that `describe` block.

For example, let's say we had not just a city database, but also a food database. We could do different setup for different tests:

Expand Down