diff --git a/docs/Configuration.md b/docs/Configuration.md index 11d60d5f4896..2f4056c74aea 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1126,6 +1126,20 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); +beforeEach(() => { + // your code +}); +afterEach(() => { + // your code +}); +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number] diff --git a/website/versioned_docs/version-27.0/Configuration.md b/website/versioned_docs/version-27.0/Configuration.md index ab8d4eda9693..3e3c5128dcda 100644 --- a/website/versioned_docs/version-27.0/Configuration.md +++ b/website/versioned_docs/version-27.0/Configuration.md @@ -926,6 +926,20 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); +beforeEach(() => { + // your code +}); +afterEach(() => { + // your code +}); +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number] diff --git a/website/versioned_docs/version-27.1/Configuration.md b/website/versioned_docs/version-27.1/Configuration.md index 59e1816d519c..3031336442e2 100644 --- a/website/versioned_docs/version-27.1/Configuration.md +++ b/website/versioned_docs/version-27.1/Configuration.md @@ -926,6 +926,20 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); +beforeEach(() => { + // your code +}); +afterEach(() => { + // your code +}); +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number] diff --git a/website/versioned_docs/version-27.2/Configuration.md b/website/versioned_docs/version-27.2/Configuration.md index 82773cfbeaf6..38d56aea604c 100644 --- a/website/versioned_docs/version-27.2/Configuration.md +++ b/website/versioned_docs/version-27.2/Configuration.md @@ -930,6 +930,20 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); +beforeEach(() => { + // your code +}); +afterEach(() => { + // your code +}); +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number] diff --git a/website/versioned_docs/version-27.4/Configuration.md b/website/versioned_docs/version-27.4/Configuration.md index de7e3dd8d032..38394bfac5d4 100644 --- a/website/versioned_docs/version-27.4/Configuration.md +++ b/website/versioned_docs/version-27.4/Configuration.md @@ -932,6 +932,20 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); +beforeEach(() => { + // your code +}); +afterEach(() => { + // your code +}); +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number] diff --git a/website/versioned_docs/version-27.5/Configuration.md b/website/versioned_docs/version-27.5/Configuration.md index de7e3dd8d032..58d727a2cdc4 100644 --- a/website/versioned_docs/version-27.5/Configuration.md +++ b/website/versioned_docs/version-27.5/Configuration.md @@ -932,6 +932,23 @@ Example `jest.setup.js` file ```js jest.setTimeout(10000); // in milliseconds + +// you can even use the setup/teardown methods +beforeAll(() => { + // your code +}); + +beforeEach(() => { + // your code +}); + +afterEach(() => { + // your code +}); + +afterAll(() => { + // your code +}); ``` ### `slowTestThreshold` \[number]