From a41f2c3878f9a108260145ecf7c08bac4e47caa5 Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 4 Oct 2025 13:59:12 +0700 Subject: [PATCH 1/5] doc: update v30 migration guide for `jest.mock()` strictly case-sentitive path Signed-off-by: hainenber --- docs/UpgradingToJest30.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/UpgradingToJest30.md b/docs/UpgradingToJest30.md index f51c7488e863..d738d29f287c 100644 --- a/docs/UpgradingToJest30.md +++ b/docs/UpgradingToJest30.md @@ -184,6 +184,22 @@ Some TypeScript types related to mock functions have been removed from the publi If you were using `jest.SpyInstance` (for instance, to annotate the return of `jest.spyOn`), you should update to using [`jest.Spied`](./MockFunctionAPI.md#jestspiedsource). +### `jest.mock` only mock case-sensitive module filename + +`jest.mock()` will only accept case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. + +Old code (Jest 29): + +```js +jest.mock('./path/to/FILENAME.js') # This works EVEN when you only have `filename.js` +``` + +New code (Jest 30): + +```js +jest.mock('./path/to/filename.js') # This strictly works when you ONLY have `filename.js` +``` + ## Module & Runtime Changes ### ESM Module Support and Internal Restructuring From 704c65e632fc94cc925b972899ea98b148d9c35e Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 4 Oct 2025 14:21:15 +0700 Subject: [PATCH 2/5] chore: prettify all Markdown docs Signed-off-by: hainenber --- docs/GlobalAPI.md | 30 +++++++++++++++--------------- docs/UpgradingToJest30.md | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/GlobalAPI.md b/docs/GlobalAPI.md index 389499268c65..a59a2de431f3 100644 --- a/docs/GlobalAPI.md +++ b/docs/GlobalAPI.md @@ -299,7 +299,7 @@ describe.each([ }); ``` -#### 2. ``describe.each`table`(name, fn, timeout)`` +#### 2. `` describe.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -356,7 +356,7 @@ describe('my other beverage', () => { ### `describe.only.each(table)(name, fn)` -Also under the aliases: `fdescribe.each(table)(name, fn)` and ``fdescribe.each`table`(name, fn)`` +Also under the aliases: `fdescribe.each(table)(name, fn)` and `` fdescribe.each`table`(name, fn) `` Use `describe.only.each` if you want to only run specific tests suites of data driven tests. @@ -380,7 +380,7 @@ test('will not be run', () => { }); ``` -#### ``describe.only.each`table`(name, fn)`` +#### `` describe.only.each`table`(name, fn) `` ```js describe.only.each` @@ -425,7 +425,7 @@ Using `describe.skip` is often a cleaner alternative to temporarily commenting o ### `describe.skip.each(table)(name, fn)` -Also under the aliases: `xdescribe.each(table)(name, fn)` and ``xdescribe.each`table`(name, fn)`` +Also under the aliases: `xdescribe.each(table)(name, fn)` and `` xdescribe.each`table`(name, fn) `` Use `describe.skip.each` if you want to stop running a suite of data driven tests. @@ -449,7 +449,7 @@ test('will be run', () => { }); ``` -#### ``describe.skip.each`table`(name, fn)`` +#### `` describe.skip.each`table`(name, fn) `` ```js describe.skip.each` @@ -568,7 +568,7 @@ test.concurrent.each([ }); ``` -#### 2. ``test.concurrent.each`table`(name, fn, timeout)`` +#### 2. `` test.concurrent.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -615,7 +615,7 @@ test('will not be run', () => { }); ``` -#### ``test.only.each`table`(name, fn)`` +#### `` test.only.each`table`(name, fn) `` ```js test.concurrent.only.each` @@ -656,7 +656,7 @@ test('will be run', () => { }); ``` -#### ``test.concurrent.skip.each`table`(name, fn)`` +#### `` test.concurrent.skip.each`table`(name, fn) `` ```js test.concurrent.skip.each` @@ -675,7 +675,7 @@ test('will be run', () => { ### `test.each(table)(name, fn, timeout)` -Also under the alias: `it.each(table)(name, fn)` and ``it.each`table`(name, fn)`` +Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) `` Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. @@ -725,7 +725,7 @@ test.each([ }); ``` -#### 2. ``test.each`table`(name, fn, timeout)`` +#### 2. `` test.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -782,7 +782,7 @@ test.failing('it is equal', () => { ### `test.failing.each(name, fn, timeout)` -Also under the alias: `it.failing.each(table)(name, fn)` and ``it.failing.each`table`(name, fn)`` +Also under the alias: `it.failing.each(table)(name, fn)` and `` it.failing.each`table`(name, fn) `` :::note @@ -854,7 +854,7 @@ Usually you wouldn't check code using `test.only` into source control - you woul ### `test.only.each(table)(name, fn)` -Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, ``it.only.each`table`(name, fn)`` and ``fit.each`table`(name, fn)`` +Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, `` it.only.each`table`(name, fn) `` and `` fit.each`table`(name, fn) `` Use `test.only.each` if you want to only run specific tests with different test data. @@ -876,7 +876,7 @@ test('will not be run', () => { }); ``` -#### ``test.only.each`table`(name, fn)`` +#### `` test.only.each`table`(name, fn) `` ```js test.only.each` @@ -917,7 +917,7 @@ You could comment the test out, but it's often a bit nicer to use `test.skip` be ### `test.skip.each(table)(name, fn)` -Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, ``it.skip.each`table`(name, fn)``, ``xit.each`table`(name, fn)`` and ``xtest.each`table`(name, fn)`` +Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, `` it.skip.each`table`(name, fn) ``, `` xit.each`table`(name, fn) `` and `` xtest.each`table`(name, fn) `` Use `test.skip.each` if you want to stop running a collection of data driven tests. @@ -939,7 +939,7 @@ test('will be run', () => { }); ``` -#### ``test.skip.each`table`(name, fn)`` +#### `` test.skip.each`table`(name, fn) `` ```js test.skip.each` diff --git a/docs/UpgradingToJest30.md b/docs/UpgradingToJest30.md index d738d29f287c..e319957cd21a 100644 --- a/docs/UpgradingToJest30.md +++ b/docs/UpgradingToJest30.md @@ -184,9 +184,9 @@ Some TypeScript types related to mock functions have been removed from the publi If you were using `jest.SpyInstance` (for instance, to annotate the return of `jest.spyOn`), you should update to using [`jest.Spied`](./MockFunctionAPI.md#jestspiedsource). -### `jest.mock` only mock case-sensitive module filename +### `jest.mock` only mock case-sensitive module filename -`jest.mock()` will only accept case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. +`jest.mock()` will only accept case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. Old code (Jest 29): From a243b8b41c20b494d17aaae1e03acacb038c8771 Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 4 Oct 2025 14:24:40 +0700 Subject: [PATCH 3/5] chore: add CHANGELOG entry + rewording Signed-off-by: hainenber --- CHANGELOG.md | 4 ++++ docs/UpgradingToJest30.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 917db93ebb8c..919e301ab55e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - `[jest-runtime]` Fix issue where user cannot utilize dynamic import despite specifying `--experimental-vm-modules` Node option ([#15842](https://github.com/jestjs/jest/pull/15842)) +### Chore & Maintenance + +- `[docs]` Update V30 migration guide to notify users on `jest.mock()` work with case-sensitive path ([#15849](https://github.com/jestjs/jest/pull/15849)) + ## 30.2.0 ### Chore & Maintenance diff --git a/docs/UpgradingToJest30.md b/docs/UpgradingToJest30.md index e319957cd21a..89fafdc275cd 100644 --- a/docs/UpgradingToJest30.md +++ b/docs/UpgradingToJest30.md @@ -184,9 +184,9 @@ Some TypeScript types related to mock functions have been removed from the publi If you were using `jest.SpyInstance` (for instance, to annotate the return of `jest.spyOn`), you should update to using [`jest.Spied`](./MockFunctionAPI.md#jestspiedsource). -### `jest.mock` only mock case-sensitive module filename +### `jest.mock` only works with case-sensitive module path -`jest.mock()` will only accept case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. +`jest.mock()` will only work case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. Old code (Jest 29): From 1428322e9e0863f1400db9badbc6bda53622c166 Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 4 Oct 2025 22:50:45 +0700 Subject: [PATCH 4/5] chore: prettify all versioned Markdown docs Signed-off-by: hainenber --- docs/UpgradingToJest30.md | 4 +-- .../versioned_docs/version-30.0/GlobalAPI.md | 30 +++++++++---------- .../version-30.0/UpgradingToJest30.md | 16 ++++++++++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/docs/UpgradingToJest30.md b/docs/UpgradingToJest30.md index 89fafdc275cd..ba6dddf58650 100644 --- a/docs/UpgradingToJest30.md +++ b/docs/UpgradingToJest30.md @@ -191,13 +191,13 @@ If you were using `jest.SpyInstance` (for instance, to annotate the return of `j Old code (Jest 29): ```js -jest.mock('./path/to/FILENAME.js') # This works EVEN when you only have `filename.js` +jest.mock('./path/to/FILENAME.js'); // This works EVEN when you only have `filename.js` ``` New code (Jest 30): ```js -jest.mock('./path/to/filename.js') # This strictly works when you ONLY have `filename.js` +jest.mock('./path/to/filename.js'); // This strictly works when you ONLY have `filename.js` ``` ## Module & Runtime Changes diff --git a/website/versioned_docs/version-30.0/GlobalAPI.md b/website/versioned_docs/version-30.0/GlobalAPI.md index 389499268c65..a59a2de431f3 100644 --- a/website/versioned_docs/version-30.0/GlobalAPI.md +++ b/website/versioned_docs/version-30.0/GlobalAPI.md @@ -299,7 +299,7 @@ describe.each([ }); ``` -#### 2. ``describe.each`table`(name, fn, timeout)`` +#### 2. `` describe.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -356,7 +356,7 @@ describe('my other beverage', () => { ### `describe.only.each(table)(name, fn)` -Also under the aliases: `fdescribe.each(table)(name, fn)` and ``fdescribe.each`table`(name, fn)`` +Also under the aliases: `fdescribe.each(table)(name, fn)` and `` fdescribe.each`table`(name, fn) `` Use `describe.only.each` if you want to only run specific tests suites of data driven tests. @@ -380,7 +380,7 @@ test('will not be run', () => { }); ``` -#### ``describe.only.each`table`(name, fn)`` +#### `` describe.only.each`table`(name, fn) `` ```js describe.only.each` @@ -425,7 +425,7 @@ Using `describe.skip` is often a cleaner alternative to temporarily commenting o ### `describe.skip.each(table)(name, fn)` -Also under the aliases: `xdescribe.each(table)(name, fn)` and ``xdescribe.each`table`(name, fn)`` +Also under the aliases: `xdescribe.each(table)(name, fn)` and `` xdescribe.each`table`(name, fn) `` Use `describe.skip.each` if you want to stop running a suite of data driven tests. @@ -449,7 +449,7 @@ test('will be run', () => { }); ``` -#### ``describe.skip.each`table`(name, fn)`` +#### `` describe.skip.each`table`(name, fn) `` ```js describe.skip.each` @@ -568,7 +568,7 @@ test.concurrent.each([ }); ``` -#### 2. ``test.concurrent.each`table`(name, fn, timeout)`` +#### 2. `` test.concurrent.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -615,7 +615,7 @@ test('will not be run', () => { }); ``` -#### ``test.only.each`table`(name, fn)`` +#### `` test.only.each`table`(name, fn) `` ```js test.concurrent.only.each` @@ -656,7 +656,7 @@ test('will be run', () => { }); ``` -#### ``test.concurrent.skip.each`table`(name, fn)`` +#### `` test.concurrent.skip.each`table`(name, fn) `` ```js test.concurrent.skip.each` @@ -675,7 +675,7 @@ test('will be run', () => { ### `test.each(table)(name, fn, timeout)` -Also under the alias: `it.each(table)(name, fn)` and ``it.each`table`(name, fn)`` +Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) `` Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. @@ -725,7 +725,7 @@ test.each([ }); ``` -#### 2. ``test.each`table`(name, fn, timeout)`` +#### 2. `` test.each`table`(name, fn, timeout) `` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -782,7 +782,7 @@ test.failing('it is equal', () => { ### `test.failing.each(name, fn, timeout)` -Also under the alias: `it.failing.each(table)(name, fn)` and ``it.failing.each`table`(name, fn)`` +Also under the alias: `it.failing.each(table)(name, fn)` and `` it.failing.each`table`(name, fn) `` :::note @@ -854,7 +854,7 @@ Usually you wouldn't check code using `test.only` into source control - you woul ### `test.only.each(table)(name, fn)` -Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, ``it.only.each`table`(name, fn)`` and ``fit.each`table`(name, fn)`` +Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, `` it.only.each`table`(name, fn) `` and `` fit.each`table`(name, fn) `` Use `test.only.each` if you want to only run specific tests with different test data. @@ -876,7 +876,7 @@ test('will not be run', () => { }); ``` -#### ``test.only.each`table`(name, fn)`` +#### `` test.only.each`table`(name, fn) `` ```js test.only.each` @@ -917,7 +917,7 @@ You could comment the test out, but it's often a bit nicer to use `test.skip` be ### `test.skip.each(table)(name, fn)` -Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, ``it.skip.each`table`(name, fn)``, ``xit.each`table`(name, fn)`` and ``xtest.each`table`(name, fn)`` +Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, `` it.skip.each`table`(name, fn) ``, `` xit.each`table`(name, fn) `` and `` xtest.each`table`(name, fn) `` Use `test.skip.each` if you want to stop running a collection of data driven tests. @@ -939,7 +939,7 @@ test('will be run', () => { }); ``` -#### ``test.skip.each`table`(name, fn)`` +#### `` test.skip.each`table`(name, fn) `` ```js test.skip.each` diff --git a/website/versioned_docs/version-30.0/UpgradingToJest30.md b/website/versioned_docs/version-30.0/UpgradingToJest30.md index f51c7488e863..ba6dddf58650 100644 --- a/website/versioned_docs/version-30.0/UpgradingToJest30.md +++ b/website/versioned_docs/version-30.0/UpgradingToJest30.md @@ -184,6 +184,22 @@ Some TypeScript types related to mock functions have been removed from the publi If you were using `jest.SpyInstance` (for instance, to annotate the return of `jest.spyOn`), you should update to using [`jest.Spied`](./MockFunctionAPI.md#jestspiedsource). +### `jest.mock` only works with case-sensitive module path + +`jest.mock()` will only work case-sensitive module path from now on. At best, this is an edge case since most users would follow OS filename pattern behavior. We recommend to use correctly named module path to avoid similar breakages in the future. + +Old code (Jest 29): + +```js +jest.mock('./path/to/FILENAME.js'); // This works EVEN when you only have `filename.js` +``` + +New code (Jest 30): + +```js +jest.mock('./path/to/filename.js'); // This strictly works when you ONLY have `filename.js` +``` + ## Module & Runtime Changes ### ESM Module Support and Internal Restructuring From d44f02c19b04002a5b97edec2739c3ddddc216ec Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 4 Oct 2025 23:07:15 +0700 Subject: [PATCH 5/5] chore: prettify Markdown docs with `yarn lint:prettier` command Signed-off-by: hainenber --- CHANGELOG.md | 2 +- docs/GlobalAPI.md | 30 +++++++++---------- .../versioned_docs/version-30.0/GlobalAPI.md | 30 +++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 919e301ab55e..4111f178bfe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ### Chore & Maintenance -- `[docs]` Update V30 migration guide to notify users on `jest.mock()` work with case-sensitive path ([#15849](https://github.com/jestjs/jest/pull/15849)) +- `[docs]` Update V30 migration guide to notify users on `jest.mock()` work with case-sensitive path ([#15849](https://github.com/jestjs/jest/pull/15849)) ## 30.2.0 diff --git a/docs/GlobalAPI.md b/docs/GlobalAPI.md index a59a2de431f3..389499268c65 100644 --- a/docs/GlobalAPI.md +++ b/docs/GlobalAPI.md @@ -299,7 +299,7 @@ describe.each([ }); ``` -#### 2. `` describe.each`table`(name, fn, timeout) `` +#### 2. ``describe.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -356,7 +356,7 @@ describe('my other beverage', () => { ### `describe.only.each(table)(name, fn)` -Also under the aliases: `fdescribe.each(table)(name, fn)` and `` fdescribe.each`table`(name, fn) `` +Also under the aliases: `fdescribe.each(table)(name, fn)` and ``fdescribe.each`table`(name, fn)`` Use `describe.only.each` if you want to only run specific tests suites of data driven tests. @@ -380,7 +380,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -425,7 +425,7 @@ Using `describe.skip` is often a cleaner alternative to temporarily commenting o ### `describe.skip.each(table)(name, fn)` -Also under the aliases: `xdescribe.each(table)(name, fn)` and `` xdescribe.each`table`(name, fn) `` +Also under the aliases: `xdescribe.each(table)(name, fn)` and ``xdescribe.each`table`(name, fn)`` Use `describe.skip.each` if you want to stop running a suite of data driven tests. @@ -449,7 +449,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -568,7 +568,7 @@ test.concurrent.each([ }); ``` -#### 2. `` test.concurrent.each`table`(name, fn, timeout) `` +#### 2. ``test.concurrent.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -615,7 +615,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -656,7 +656,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -675,7 +675,7 @@ test('will be run', () => { ### `test.each(table)(name, fn, timeout)` -Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) `` +Also under the alias: `it.each(table)(name, fn)` and ``it.each`table`(name, fn)`` Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. @@ -725,7 +725,7 @@ test.each([ }); ``` -#### 2. `` test.each`table`(name, fn, timeout) `` +#### 2. ``test.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -782,7 +782,7 @@ test.failing('it is equal', () => { ### `test.failing.each(name, fn, timeout)` -Also under the alias: `it.failing.each(table)(name, fn)` and `` it.failing.each`table`(name, fn) `` +Also under the alias: `it.failing.each(table)(name, fn)` and ``it.failing.each`table`(name, fn)`` :::note @@ -854,7 +854,7 @@ Usually you wouldn't check code using `test.only` into source control - you woul ### `test.only.each(table)(name, fn)` -Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, `` it.only.each`table`(name, fn) `` and `` fit.each`table`(name, fn) `` +Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, ``it.only.each`table`(name, fn)`` and ``fit.each`table`(name, fn)`` Use `test.only.each` if you want to only run specific tests with different test data. @@ -876,7 +876,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -917,7 +917,7 @@ You could comment the test out, but it's often a bit nicer to use `test.skip` be ### `test.skip.each(table)(name, fn)` -Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, `` it.skip.each`table`(name, fn) ``, `` xit.each`table`(name, fn) `` and `` xtest.each`table`(name, fn) `` +Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, ``it.skip.each`table`(name, fn)``, ``xit.each`table`(name, fn)`` and ``xtest.each`table`(name, fn)`` Use `test.skip.each` if you want to stop running a collection of data driven tests. @@ -939,7 +939,7 @@ test('will be run', () => { }); ``` -#### `` test.skip.each`table`(name, fn) `` +#### ``test.skip.each`table`(name, fn)`` ```js test.skip.each` diff --git a/website/versioned_docs/version-30.0/GlobalAPI.md b/website/versioned_docs/version-30.0/GlobalAPI.md index a59a2de431f3..389499268c65 100644 --- a/website/versioned_docs/version-30.0/GlobalAPI.md +++ b/website/versioned_docs/version-30.0/GlobalAPI.md @@ -299,7 +299,7 @@ describe.each([ }); ``` -#### 2. `` describe.each`table`(name, fn, timeout) `` +#### 2. ``describe.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -356,7 +356,7 @@ describe('my other beverage', () => { ### `describe.only.each(table)(name, fn)` -Also under the aliases: `fdescribe.each(table)(name, fn)` and `` fdescribe.each`table`(name, fn) `` +Also under the aliases: `fdescribe.each(table)(name, fn)` and ``fdescribe.each`table`(name, fn)`` Use `describe.only.each` if you want to only run specific tests suites of data driven tests. @@ -380,7 +380,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -425,7 +425,7 @@ Using `describe.skip` is often a cleaner alternative to temporarily commenting o ### `describe.skip.each(table)(name, fn)` -Also under the aliases: `xdescribe.each(table)(name, fn)` and `` xdescribe.each`table`(name, fn) `` +Also under the aliases: `xdescribe.each(table)(name, fn)` and ``xdescribe.each`table`(name, fn)`` Use `describe.skip.each` if you want to stop running a suite of data driven tests. @@ -449,7 +449,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -568,7 +568,7 @@ test.concurrent.each([ }); ``` -#### 2. `` test.concurrent.each`table`(name, fn, timeout) `` +#### 2. ``test.concurrent.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -615,7 +615,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -656,7 +656,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -675,7 +675,7 @@ test('will be run', () => { ### `test.each(table)(name, fn, timeout)` -Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) `` +Also under the alias: `it.each(table)(name, fn)` and ``it.each`table`(name, fn)`` Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. @@ -725,7 +725,7 @@ test.each([ }); ``` -#### 2. `` test.each`table`(name, fn, timeout) `` +#### 2. ``test.each`table`(name, fn, timeout)`` - `table`: `Tagged Template Literal` - First row of variable name column headings separated with `|` @@ -782,7 +782,7 @@ test.failing('it is equal', () => { ### `test.failing.each(name, fn, timeout)` -Also under the alias: `it.failing.each(table)(name, fn)` and `` it.failing.each`table`(name, fn) `` +Also under the alias: `it.failing.each(table)(name, fn)` and ``it.failing.each`table`(name, fn)`` :::note @@ -854,7 +854,7 @@ Usually you wouldn't check code using `test.only` into source control - you woul ### `test.only.each(table)(name, fn)` -Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, `` it.only.each`table`(name, fn) `` and `` fit.each`table`(name, fn) `` +Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, ``it.only.each`table`(name, fn)`` and ``fit.each`table`(name, fn)`` Use `test.only.each` if you want to only run specific tests with different test data. @@ -876,7 +876,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -917,7 +917,7 @@ You could comment the test out, but it's often a bit nicer to use `test.skip` be ### `test.skip.each(table)(name, fn)` -Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, `` it.skip.each`table`(name, fn) ``, `` xit.each`table`(name, fn) `` and `` xtest.each`table`(name, fn) `` +Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, ``it.skip.each`table`(name, fn)``, ``xit.each`table`(name, fn)`` and ``xtest.each`table`(name, fn)`` Use `test.skip.each` if you want to stop running a collection of data driven tests. @@ -939,7 +939,7 @@ test('will be run', () => { }); ``` -#### `` test.skip.each`table`(name, fn) `` +#### ``test.skip.each`table`(name, fn)`` ```js test.skip.each`