From ad20263947cd5b0751db2142ef3113c0b34c1d33 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 28 Sep 2023 16:56:59 +0200 Subject: [PATCH 1/4] chore: upgrade to prettier v3 --- .../__tests__/typescript.test.ts | 2 +- package.json | 24 +++++++++++++++++-- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/expect/src/asymmetricMatchers.ts | 5 +++- packages/expect/src/types.ts | 9 +++---- packages/jest-core/src/TestScheduler.ts | 5 ++-- .../jest-core/src/__tests__/watch.test.js | 2 +- .../lib/__tests__/logDebugMessages.test.ts | 2 +- packages/jest-core/src/runJest.ts | 5 ++-- packages/jest-core/src/watch.ts | 4 ++-- packages/jest-each/src/table/array.ts | 19 ++++++++------- packages/jest-expect/src/types.ts | 4 +++- .../jest-haste-map/src/crawlers/watchman.ts | 5 ++-- .../src/__tests__/reporter.test.ts | 2 +- packages/jest-mock/src/index.ts | 3 +-- .../jest-transform/src/ScriptTransformer.ts | 5 ++-- packages/jest-types/src/Global.ts | 21 ++++++++++++---- .../src/base/__tests__/BaseWorkerPool.test.ts | 20 ++++++++-------- scripts/bundleTs.mjs | 2 +- yarn.lock | 24 +++++++++++-------- 20 files changed, 102 insertions(+), 63 deletions(-) diff --git a/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts b/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts index bc27a66d5bcf..64d7cec8c0ad 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts +++ b/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts @@ -11,7 +11,7 @@ import {color} from '../entry'; import type {Color} from '../types'; -jest.mock('some-module', () => ({} as Partial<{}>), {virtual: true}); +jest.mock('some-module', () => ({}) as Partial<{}>, {virtual: true}); jest.mock('../entry', () => { const color: Color = 'blue'; diff --git a/package.json b/package.json index 33e272d5721f..f6138aa3360c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "eslint-plugin-jsdoc": "^46.0.0", "eslint-plugin-local": "link:./.eslintplugin", "eslint-plugin-markdown": "^3.0.0", - "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-unicorn": "^48.0.0", "execa": "^5.0.0", "find-process": "^1.4.1", @@ -68,7 +68,7 @@ "node-notifier": "^10.0.0", "p-limit": "^3.1.0", "pkg-dir": "^5.0.0", - "prettier": "^2.1.1", + "prettier": "^3.0.3", "promise": "^8.0.2", "read-pkg": "^5.2.0", "resolve": "^1.20.0", @@ -163,6 +163,26 @@ "options": { "parser": "mdx" } + }, + { + "files": [ + "e2e/babel-plugin-jest-hoist/__tests__/integration.test.js", + "e2e/coverage-report/notRequiredInTestSuite.js", + "e2e/expect-async-matcher/matchers.js", + "e2e/failures/__tests__/*.js", + "e2e/failures/macros.js", + "e2e/global-setup/*.js", + "e2e/global-teardown/*.js", + "e2e/multi-project-babel/**/*.js", + "e2e/transform/babel-jest-async/only-file-to-transform.js", + "e2e/transform/babel-jest-manual/**/*.js", + "e2e/transform/babel-jest/**/*.js", + "e2e/transform/no-babel-jest/__tests__/failsWithSyntaxError.test.js", + "e2e/transform/transformer-config/**/*.js" + ], + "options": { + "parser": "babel-flow" + } } ] }, diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 9708b66d2490..c63c6dfc88c9 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -33,7 +33,7 @@ "@types/node": "*", "@types/prettier": "^2.1.5", "babel-plugin-tester": "^11.0.2", - "prettier": "^2.1.1" + "prettier": "^3.0.3" }, "publishConfig": { "access": "public" diff --git a/packages/expect/src/asymmetricMatchers.ts b/packages/expect/src/asymmetricMatchers.ts index 5bd543ac5297..190dd7d7776f 100644 --- a/packages/expect/src/asymmetricMatchers.ts +++ b/packages/expect/src/asymmetricMatchers.ts @@ -73,7 +73,10 @@ export abstract class AsymmetricMatcher { $$typeof = Symbol.for('jest.asymmetricMatcher'); - constructor(protected sample: T, protected inverse = false) {} + constructor( + protected sample: T, + protected inverse = false, + ) {} protected getMatcherContext(): MatcherContext { return { diff --git a/packages/expect/src/types.ts b/packages/expect/src/types.ts index e946ebd11e62..a4fc1b3d0329 100644 --- a/packages/expect/src/types.ts +++ b/packages/expect/src/types.ts @@ -21,7 +21,8 @@ export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult; export type MatcherFunctionWithContext< Context extends MatcherContext = MatcherContext, - Expected extends Array = [] /** TODO should be: extends Array = [] */, + Expected extends + Array = [] /** TODO should be: extends Array = [] */, > = ( this: Context, actual: unknown, @@ -98,9 +99,9 @@ export interface BaseExpect { } export type Expect = { - (actual: T): Matchers & - Inverse> & - PromiseMatchers; + ( + actual: T, + ): Matchers & Inverse> & PromiseMatchers; } & BaseExpect & AsymmetricMatchers & Inverse>; diff --git a/packages/jest-core/src/TestScheduler.ts b/packages/jest-core/src/TestScheduler.ts index 9ab4429c9160..b9260a77a0d5 100644 --- a/packages/jest-core/src/TestScheduler.ts +++ b/packages/jest-core/src/TestScheduler.ts @@ -386,9 +386,8 @@ class TestScheduler { options: Record, ) { try { - const Reporter: ReporterConstructor = await requireOrImportModule( - reporter, - ); + const Reporter: ReporterConstructor = + await requireOrImportModule(reporter); this.addReporter( new Reporter(this._globalConfig, options, this._context), diff --git a/packages/jest-core/src/__tests__/watch.test.js b/packages/jest-core/src/__tests__/watch.test.js index f8988d256c95..a29b1d285b4b 100644 --- a/packages/jest-core/src/__tests__/watch.test.js +++ b/packages/jest-core/src/__tests__/watch.test.js @@ -630,7 +630,7 @@ describe('Watch mode flows', () => { }); it.each` - ok | option + ok | option ${'✔︎'} | ${'bail'} ${'✖︎'} | ${'changedFilesWithAncestor'} ${'✔︎'} | ${'changedSince'} diff --git a/packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts b/packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts index fa4c4910ad66..1b08341df2c7 100644 --- a/packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts +++ b/packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts @@ -18,7 +18,7 @@ const getOutputStream = (resolve: (message: string) => void) => write(message: string) { resolve(message); }, - } as NodeJS.WriteStream); + }) as NodeJS.WriteStream; it('prints the jest version', async () => { expect.assertions(1); diff --git a/packages/jest-core/src/runJest.ts b/packages/jest-core/src/runJest.ts index f6d533251fc0..c87209d94e86 100644 --- a/packages/jest-core/src/runJest.ts +++ b/packages/jest-core/src/runJest.ts @@ -97,9 +97,8 @@ const processResults = async ( } if (testResultsProcessor) { - const processor = await requireOrImportModule( - testResultsProcessor, - ); + const processor = + await requireOrImportModule(testResultsProcessor); runResults = await processor(runResults); } if (isJSON) { diff --git a/packages/jest-core/src/watch.ts b/packages/jest-core/src/watch.ts index 9237d5a78220..6ba601a39a64 100644 --- a/packages/jest-core/src/watch.ts +++ b/packages/jest-core/src/watch.ts @@ -496,8 +496,8 @@ const checkForConflicts = ( .join(' and '); error = ` Watch plugins ${plugins} both attempted to register key ${chalk.bold.red( - `<${key}>`, - )}. + `<${key}>`, + )}. Please change the key configuration for one of the conflicting plugins to avoid overlap.`.trim(); } diff --git a/packages/jest-each/src/table/array.ts b/packages/jest-each/src/table/array.ts index 4a90b8a76d37..740a5a0abecd 100644 --- a/packages/jest-each/src/table/array.ts +++ b/packages/jest-each/src/table/array.ts @@ -60,16 +60,19 @@ const formatTitle = ( rowIndex: number, ): string => row - .reduce((formattedTitle, value) => { - const [placeholder] = getMatchingPlaceholders(formattedTitle); - const normalisedValue = normalisePlaceholderValue(value); - if (!placeholder) return formattedTitle; + .reduce( + (formattedTitle, value) => { + const [placeholder] = getMatchingPlaceholders(formattedTitle); + const normalisedValue = normalisePlaceholderValue(value); + if (!placeholder) return formattedTitle; - if (placeholder === PRETTY_PLACEHOLDER) - return interpolatePrettyPlaceholder(formattedTitle, normalisedValue); + if (placeholder === PRETTY_PLACEHOLDER) + return interpolatePrettyPlaceholder(formattedTitle, normalisedValue); - return util.format(formattedTitle, normalisedValue); - }, interpolateTitleIndex(interpolateEscapedPlaceholders(title), rowIndex)) + return util.format(formattedTitle, normalisedValue); + }, + interpolateTitleIndex(interpolateEscapedPlaceholders(title), rowIndex), + ) .replace(new RegExp(JEST_EACH_PLACEHOLDER_ESCAPE, 'g'), PLACEHOLDER_PREFIX); const normalisePlaceholderValue = (value: unknown) => diff --git a/packages/jest-expect/src/types.ts b/packages/jest-expect/src/types.ts index 35cd086ee94d..7cceee6d01b1 100644 --- a/packages/jest-expect/src/types.ts +++ b/packages/jest-expect/src/types.ts @@ -13,7 +13,9 @@ import type { } from 'jest-snapshot'; export type JestExpect = { - (actual: T): JestMatchers & + ( + actual: T, + ): JestMatchers & Inverse> & PromiseMatchers; // Duplicated due to https://github.com/microsoft/rushstack/issues/1709 diff --git a/packages/jest-haste-map/src/crawlers/watchman.ts b/packages/jest-haste-map/src/crawlers/watchman.ts index e795050fd0f7..dfaa20134bcf 100644 --- a/packages/jest-haste-map/src/crawlers/watchman.ts +++ b/packages/jest-haste-map/src/crawlers/watchman.ts @@ -131,9 +131,8 @@ export async function watchmanCrawl(options: CrawlerOptions): Promise<{ ); if (options.computeSha1) { - const {capabilities} = await cmd( - 'list-capabilities', - ); + const {capabilities} = + await cmd('list-capabilities'); if (capabilities.includes('field-content.sha1hex')) { fields.push('content.sha1hex'); diff --git a/packages/jest-jasmine2/src/__tests__/reporter.test.ts b/packages/jest-jasmine2/src/__tests__/reporter.test.ts index c5d2c29cd998..652bed3482af 100644 --- a/packages/jest-jasmine2/src/__tests__/reporter.test.ts +++ b/packages/jest-jasmine2/src/__tests__/reporter.test.ts @@ -24,7 +24,7 @@ describe('Jasmine2Reporter', () => { description: 'description', failedExpectations: [], fullName: name, - } as any as SpecResult); + }) as any as SpecResult; reporter.suiteStarted({description: 'parent'} as SuiteResult); reporter.suiteStarted({description: 'child'} as SuiteResult); reporter.specDone(makeSpec('spec 1')); diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts index 0a62b7335ba1..7382858ed4aa 100644 --- a/packages/jest-mock/src/index.ts +++ b/packages/jest-mock/src/index.ts @@ -744,8 +744,7 @@ export class ModuleMocker { } return finalReturnValue; - }, - metadata.length || 0); + }, metadata.length || 0); const f = this._createMockFunction(metadata, mockConstructor) as Mock; f._isMockFunction = true; diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index b0c61a587d06..e185e08e59cd 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -284,9 +284,8 @@ class ScriptTransformer { throw new Error(makeInvalidTransformerError(transformPath)); } if (isTransformerFactory(transformer)) { - transformer = await transformer.createTransformer( - transformerConfig, - ); + transformer = + await transformer.createTransformer(transformerConfig); } if ( typeof transformer.process !== 'function' && diff --git a/packages/jest-types/src/Global.ts b/packages/jest-types/src/Global.ts index ea15a036913c..2fae1a2ffadc 100644 --- a/packages/jest-types/src/Global.ts +++ b/packages/jest-types/src/Global.ts @@ -57,35 +57,46 @@ export type EachTestFn = ( interface Each { // when the table is an array of object literals - >(table: ReadonlyArray): ( + >( + table: ReadonlyArray, + ): ( name: string | NameLike, fn: (arg: T, done: DoneFn) => ReturnType, timeout?: number, ) => void; // when the table is an array of tuples - ]>(table: ReadonlyArray): ( + ]>( + table: ReadonlyArray, + ): ( name: string | NameLike, fn: (...args: T) => ReturnType, timeout?: number, ) => void; // when the table is an array of arrays - >(table: ReadonlyArray): ( + >( + table: ReadonlyArray, + ): ( name: string | NameLike, fn: (...args: T) => ReturnType, timeout?: number, ) => void; // when the table is a tuple or array - (table: ReadonlyArray): ( + ( + table: ReadonlyArray, + ): ( name: string | NameLike, fn: (arg: T, done: DoneFn) => ReturnType, timeout?: number, ) => void; // when the table is a template literal - (strings: TemplateStringsArray, ...expressions: Array): ( + ( + strings: TemplateStringsArray, + ...expressions: Array + ): ( name: string | NameLike, fn: (arg: Record, done: DoneFn) => ReturnType, timeout?: number, diff --git a/packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.ts b/packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.ts index b5b83482d5fb..2b85ac18cc98 100644 --- a/packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.ts +++ b/packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.ts @@ -34,12 +34,12 @@ describe('BaseWorkerPool', () => { ({ forceExit: jest.fn(), getStderr: () => - ({once() {}, pipe() {}} as unknown as NodeJS.ReadStream), + ({once() {}, pipe() {}}) as unknown as NodeJS.ReadStream, getStdout: () => - ({once() {}, pipe() {}} as unknown as NodeJS.ReadStream), + ({once() {}, pipe() {}}) as unknown as NodeJS.ReadStream, send: jest.fn(), waitForExit: () => Promise.resolve(), - } as unknown as WorkerInterface), + }) as unknown as WorkerInterface, ); }); @@ -138,15 +138,15 @@ describe('BaseWorkerPool', () => { pipe(errStream: NodeJS.WritableStream) { err.push(errStream); }, - } as unknown as NodeJS.ReadableStream), + }) as unknown as NodeJS.ReadableStream, getStdout: () => ({ once() {}, pipe(outStream: NodeJS.WritableStream) { out.push(outStream); }, - } as unknown as NodeJS.ReadableStream), - } as WorkerInterface), + }) as unknown as NodeJS.ReadableStream, + }) as WorkerInterface, ); const farm = new MockWorkerPool('/tmp/baz.js', { @@ -181,7 +181,7 @@ describe('BaseWorkerPool', () => { getStderr: () => null, getStdout: () => null, send: () => null, - } as unknown as WorkerInterface), + }) as unknown as WorkerInterface, ); const farm = new MockWorkerPool('/tmp/baz.js', { @@ -225,7 +225,7 @@ describe('BaseWorkerPool', () => { getStdout: () => null, send: jest.fn(), waitForExit: () => Promise.resolve(), - } as unknown as WorkerInterface), + }) as unknown as WorkerInterface, ); const pool = new MockWorkerPool('/tmp/baz.js', { @@ -253,7 +253,7 @@ describe('BaseWorkerPool', () => { send: jest.fn(), waitForExit: () => new Promise(resolve => (worker0Exited = resolve)), - } as unknown as WorkerInterface), + }) as unknown as WorkerInterface, ).mockImplementation( () => ({ @@ -262,7 +262,7 @@ describe('BaseWorkerPool', () => { getStdout: () => null, send: jest.fn(), waitForExit: () => Promise.resolve(), - } as unknown as WorkerInterface), + }) as unknown as WorkerInterface, ); const pool = new MockWorkerPool('/tmp/baz.js', { diff --git a/scripts/bundleTs.mjs b/scripts/bundleTs.mjs index 0ffeb4f5bc4c..d07a73e5ba39 100644 --- a/scripts/bundleTs.mjs +++ b/scripts/bundleTs.mjs @@ -208,7 +208,7 @@ await Promise.all( ...definitionFile.split(copyrightSnippet), ].join('\n'); - const formattedContent = prettier.format(definitionFile, { + const formattedContent = await prettier.format(definitionFile, { ...prettierConfig, filepath, }); diff --git a/yarn.lock b/yarn.lock index 7ec064809deb..6d37bad6b4ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2959,7 +2959,7 @@ __metadata: eslint-plugin-jsdoc: ^46.0.0 eslint-plugin-local: "link:./.eslintplugin" eslint-plugin-markdown: ^3.0.0 - eslint-plugin-prettier: ^4.0.0 + eslint-plugin-prettier: ^5.0.0 eslint-plugin-unicorn: ^48.0.0 execa: ^5.0.0 find-process: ^1.4.1 @@ -2987,7 +2987,7 @@ __metadata: node-notifier: ^10.0.0 p-limit: ^3.1.0 pkg-dir: ^5.0.0 - prettier: ^2.1.1 + prettier: ^3.0.3 promise: ^8.0.2 read-pkg: ^5.2.0 resolve: ^1.20.0 @@ -6550,7 +6550,7 @@ __metadata: "@types/node": "*" "@types/prettier": ^2.1.5 babel-plugin-tester: ^11.0.2 - prettier: ^2.1.1 + prettier: ^3.0.3 languageName: unknown linkType: soft @@ -9415,18 +9415,22 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^4.0.0": - version: 4.2.1 - resolution: "eslint-plugin-prettier@npm:4.2.1" +"eslint-plugin-prettier@npm:^5.0.0": + version: 5.0.0 + resolution: "eslint-plugin-prettier@npm:5.0.0" dependencies: prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.5 peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + prettier: ">=3.0.0" peerDependenciesMeta: + "@types/eslint": + optional: true eslint-config-prettier: optional: true - checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6 + checksum: 84e88744b9050f2d5ef31b94e85294dda16f3a53c2449f9d33eac8ae6264889b459bf35a68e438fb6b329c2a1d6491aac4bfa00d86317e7009de3dad0311bec6 languageName: node linkType: hard @@ -17288,7 +17292,7 @@ __metadata: languageName: node linkType: hard -"prettier-v2@npm:prettier@^2.1.5, prettier@npm:^2.1.1, prettier@npm:^2.8.3": +"prettier-v2@npm:prettier@^2.1.5, prettier@npm:^2.8.3": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: From 3c96eed02416245757e27f35e9f3778197898a5f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 28 Sep 2023 17:17:44 +0200 Subject: [PATCH 2/4] use @prettier/sync in hoist babel plugin tests --- packages/babel-plugin-jest-hoist/package.json | 1 + .../src/__tests__/hoistPlugin.test.ts | 8 +++++--- yarn.lock | 10 ++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index c63c6dfc88c9..5bd8e18dec46 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -22,6 +22,7 @@ "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", + "@prettier/sync": "^0.3.0", "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, diff --git a/packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts b/packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts index 13dd9cc28b79..642fbd31f885 100644 --- a/packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts +++ b/packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts @@ -7,13 +7,15 @@ */ import * as path from 'path'; +import {format as formatCode, resolveConfig} from '@prettier/sync'; import pluginTester from 'babel-plugin-tester'; -import {format as formatCode, resolveConfig} from 'prettier'; +import type {Options} from 'prettier'; import babelPluginJestHoist from '..'; -const prettierOptions = { - ...resolveConfig.sync(__filename), +const prettierOptions: Options = { + ...resolveConfig(__filename), filepath: __filename, + parser: 'babel-ts', }; const formatResult = (code: string) => formatCode(code, prettierOptions); diff --git a/yarn.lock b/yarn.lock index 6d37bad6b4ea..f2f0fa3d9aa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3936,6 +3936,15 @@ __metadata: languageName: node linkType: hard +"@prettier/sync@npm:^0.3.0": + version: 0.3.0 + resolution: "@prettier/sync@npm:0.3.0" + peerDependencies: + prettier: ^3.0.0 + checksum: a663ceca292629c66c2c983662293b047b48435942c25b7ea76f0eab899e434f2bc17ae3dce56ee66b29929f7853118073f716fd4c7dabc3cccf78458a168dd4 + languageName: node + linkType: hard + "@react-native-community/cli-clean@npm:11.3.5": version: 11.3.5 resolution: "@react-native-community/cli-clean@npm:11.3.5" @@ -6544,6 +6553,7 @@ __metadata: "@babel/preset-typescript": ^7.0.0 "@babel/template": ^7.3.3 "@babel/types": ^7.3.3 + "@prettier/sync": ^0.3.0 "@types/babel__core": ^7.1.14 "@types/babel__template": ^7.0.2 "@types/babel__traverse": ^7.0.6 From fd7831bd84999bf71f877186cf1be57a2eaca2ad Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 28 Sep 2023 17:18:35 +0200 Subject: [PATCH 3/4] not dep --- packages/babel-plugin-jest-hoist/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 5bd8e18dec46..f3711657bfce 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -22,7 +22,6 @@ "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@prettier/sync": "^0.3.0", "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, @@ -30,6 +29,7 @@ "@babel/core": "^7.11.6", "@babel/preset-react": "^7.12.1", "@babel/preset-typescript": "^7.0.0", + "@prettier/sync": "^0.3.0", "@types/babel__template": "^7.0.2", "@types/node": "*", "@types/prettier": "^2.1.5", From 99ac22674047de1f6341b7af4147b19aa09915f6 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 28 Sep 2023 20:12:16 +0200 Subject: [PATCH 4/4] md as well --- docs/GlobalAPI.md | 30 +++++++++---------- .../versioned_docs/version-29.4/GlobalAPI.md | 30 +++++++++---------- .../versioned_docs/version-29.5/GlobalAPI.md | 30 +++++++++---------- .../versioned_docs/version-29.6/GlobalAPI.md | 30 +++++++++---------- .../versioned_docs/version-29.7/GlobalAPI.md | 30 +++++++++---------- 5 files changed, 75 insertions(+), 75 deletions(-) diff --git a/docs/GlobalAPI.md b/docs/GlobalAPI.md index 87e42de4709f..2a04d4e352a3 100644 --- a/docs/GlobalAPI.md +++ b/docs/GlobalAPI.md @@ -298,7 +298,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 `|` @@ -355,7 +355,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. @@ -379,7 +379,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -424,7 +424,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. @@ -448,7 +448,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -566,7 +566,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 `|` @@ -613,7 +613,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -654,7 +654,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -673,7 +673,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. @@ -722,7 +722,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 `|` @@ -779,7 +779,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 @@ -851,7 +851,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. @@ -873,7 +873,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -914,7 +914,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. @@ -936,7 +936,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-29.4/GlobalAPI.md b/website/versioned_docs/version-29.4/GlobalAPI.md index 87e42de4709f..2a04d4e352a3 100644 --- a/website/versioned_docs/version-29.4/GlobalAPI.md +++ b/website/versioned_docs/version-29.4/GlobalAPI.md @@ -298,7 +298,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 `|` @@ -355,7 +355,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. @@ -379,7 +379,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -424,7 +424,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. @@ -448,7 +448,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -566,7 +566,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 `|` @@ -613,7 +613,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -654,7 +654,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -673,7 +673,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. @@ -722,7 +722,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 `|` @@ -779,7 +779,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 @@ -851,7 +851,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. @@ -873,7 +873,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -914,7 +914,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. @@ -936,7 +936,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-29.5/GlobalAPI.md b/website/versioned_docs/version-29.5/GlobalAPI.md index 87e42de4709f..2a04d4e352a3 100644 --- a/website/versioned_docs/version-29.5/GlobalAPI.md +++ b/website/versioned_docs/version-29.5/GlobalAPI.md @@ -298,7 +298,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 `|` @@ -355,7 +355,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. @@ -379,7 +379,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -424,7 +424,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. @@ -448,7 +448,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -566,7 +566,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 `|` @@ -613,7 +613,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -654,7 +654,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -673,7 +673,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. @@ -722,7 +722,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 `|` @@ -779,7 +779,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 @@ -851,7 +851,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. @@ -873,7 +873,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -914,7 +914,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. @@ -936,7 +936,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-29.6/GlobalAPI.md b/website/versioned_docs/version-29.6/GlobalAPI.md index 87e42de4709f..2a04d4e352a3 100644 --- a/website/versioned_docs/version-29.6/GlobalAPI.md +++ b/website/versioned_docs/version-29.6/GlobalAPI.md @@ -298,7 +298,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 `|` @@ -355,7 +355,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. @@ -379,7 +379,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -424,7 +424,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. @@ -448,7 +448,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -566,7 +566,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 `|` @@ -613,7 +613,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -654,7 +654,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -673,7 +673,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. @@ -722,7 +722,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 `|` @@ -779,7 +779,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 @@ -851,7 +851,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. @@ -873,7 +873,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -914,7 +914,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. @@ -936,7 +936,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-29.7/GlobalAPI.md b/website/versioned_docs/version-29.7/GlobalAPI.md index 87e42de4709f..2a04d4e352a3 100644 --- a/website/versioned_docs/version-29.7/GlobalAPI.md +++ b/website/versioned_docs/version-29.7/GlobalAPI.md @@ -298,7 +298,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 `|` @@ -355,7 +355,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. @@ -379,7 +379,7 @@ test('will not be run', () => { }); ``` -#### `` describe.only.each`table`(name, fn) `` +#### ``describe.only.each`table`(name, fn)`` ```js describe.only.each` @@ -424,7 +424,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. @@ -448,7 +448,7 @@ test('will be run', () => { }); ``` -#### `` describe.skip.each`table`(name, fn) `` +#### ``describe.skip.each`table`(name, fn)`` ```js describe.skip.each` @@ -566,7 +566,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 `|` @@ -613,7 +613,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.concurrent.only.each` @@ -654,7 +654,7 @@ test('will be run', () => { }); ``` -#### `` test.concurrent.skip.each`table`(name, fn) `` +#### ``test.concurrent.skip.each`table`(name, fn)`` ```js test.concurrent.skip.each` @@ -673,7 +673,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. @@ -722,7 +722,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 `|` @@ -779,7 +779,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 @@ -851,7 +851,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. @@ -873,7 +873,7 @@ test('will not be run', () => { }); ``` -#### `` test.only.each`table`(name, fn) `` +#### ``test.only.each`table`(name, fn)`` ```js test.only.each` @@ -914,7 +914,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. @@ -936,7 +936,7 @@ test('will be run', () => { }); ``` -#### `` test.skip.each`table`(name, fn) `` +#### ``test.skip.each`table`(name, fn)`` ```js test.skip.each`