chore: upgrade to prettier v3 (#14582)

This commit is contained in:
Simen Bekkhus
2023-09-28 18:32:53 +00:00
committed by GitHub
parent e552c1a325
commit 6a255b60cb
26 changed files with 193 additions and 141 deletions
+15 -15
View File
@@ -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`
@@ -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';
+22 -2
View File
@@ -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"
}
}
]
},
@@ -29,11 +29,12 @@
"@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",
"babel-plugin-tester": "^11.0.2",
"prettier": "^2.1.1"
"prettier": "^3.0.3"
},
"publishConfig": {
"access": "public"
@@ -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);
+4 -1
View File
@@ -73,7 +73,10 @@ export abstract class AsymmetricMatcher<T>
{
$$typeof = Symbol.for('jest.asymmetricMatcher');
constructor(protected sample: T, protected inverse = false) {}
constructor(
protected sample: T,
protected inverse = false,
) {}
protected getMatcherContext(): MatcherContext {
return {
+5 -4
View File
@@ -21,7 +21,8 @@ export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult;
export type MatcherFunctionWithContext<
Context extends MatcherContext = MatcherContext,
Expected extends Array<any> = [] /** TODO should be: extends Array<unknown> = [] */,
Expected extends
Array<any> = [] /** TODO should be: extends Array<unknown> = [] */,
> = (
this: Context,
actual: unknown,
@@ -98,9 +99,9 @@ export interface BaseExpect {
}
export type Expect = {
<T = unknown>(actual: T): Matchers<void, T> &
Inverse<Matchers<void, T>> &
PromiseMatchers<T>;
<T = unknown>(
actual: T,
): Matchers<void, T> & Inverse<Matchers<void, T>> & PromiseMatchers<T>;
} & BaseExpect &
AsymmetricMatchers &
Inverse<Omit<AsymmetricMatchers, 'any' | 'anything'>>;
+2 -3
View File
@@ -386,9 +386,8 @@ class TestScheduler {
options: Record<string, unknown>,
) {
try {
const Reporter: ReporterConstructor = await requireOrImportModule(
reporter,
);
const Reporter: ReporterConstructor =
await requireOrImportModule(reporter);
this.addReporter(
new Reporter(this._globalConfig, options, this._context),
@@ -630,7 +630,7 @@ describe('Watch mode flows', () => {
});
it.each`
ok | option
ok | option
${'✔︎'} | ${'bail'}
${'✖︎'} | ${'changedFilesWithAncestor'}
${'✔︎'} | ${'changedSince'}
@@ -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);
+2 -3
View File
@@ -97,9 +97,8 @@ const processResults = async (
}
if (testResultsProcessor) {
const processor = await requireOrImportModule<TestResultsProcessor>(
testResultsProcessor,
);
const processor =
await requireOrImportModule<TestResultsProcessor>(testResultsProcessor);
runResults = await processor(runResults);
}
if (isJSON) {
+2 -2
View File
@@ -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();
}
+11 -8
View File
@@ -60,16 +60,19 @@ const formatTitle = (
rowIndex: number,
): string =>
row
.reduce<string>((formattedTitle, value) => {
const [placeholder] = getMatchingPlaceholders(formattedTitle);
const normalisedValue = normalisePlaceholderValue(value);
if (!placeholder) return formattedTitle;
.reduce<string>(
(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) =>
+3 -1
View File
@@ -13,7 +13,9 @@ import type {
} from 'jest-snapshot';
export type JestExpect = {
<T = unknown>(actual: T): JestMatchers<void, T> &
<T = unknown>(
actual: T,
): JestMatchers<void, T> &
Inverse<JestMatchers<void, T>> &
PromiseMatchers<T>;
// Duplicated due to https://github.com/microsoft/rushstack/issues/1709
@@ -131,9 +131,8 @@ export async function watchmanCrawl(options: CrawlerOptions): Promise<{
);
if (options.computeSha1) {
const {capabilities} = await cmd<WatchmanListCapabilitiesResponse>(
'list-capabilities',
);
const {capabilities} =
await cmd<WatchmanListCapabilitiesResponse>('list-capabilities');
if (capabilities.includes('field-content.sha1hex')) {
fields.push('content.sha1hex');
@@ -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'));
+1 -2
View File
@@ -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;
@@ -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' &&
+16 -5
View File
@@ -57,35 +57,46 @@ export type EachTestFn<EachCallback extends TestCallback> = (
interface Each<EachFn extends TestFn | BlockFn> {
// when the table is an array of object literals
<T extends Record<string, unknown>>(table: ReadonlyArray<T>): (
<T extends Record<string, unknown>>(
table: ReadonlyArray<T>,
): (
name: string | NameLike,
fn: (arg: T, done: DoneFn) => ReturnType<EachFn>,
timeout?: number,
) => void;
// when the table is an array of tuples
<T extends readonly [unknown, ...Array<unknown>]>(table: ReadonlyArray<T>): (
<T extends readonly [unknown, ...Array<unknown>]>(
table: ReadonlyArray<T>,
): (
name: string | NameLike,
fn: (...args: T) => ReturnType<EachFn>,
timeout?: number,
) => void;
// when the table is an array of arrays
<T extends ReadonlyArray<unknown>>(table: ReadonlyArray<T>): (
<T extends ReadonlyArray<unknown>>(
table: ReadonlyArray<T>,
): (
name: string | NameLike,
fn: (...args: T) => ReturnType<EachFn>,
timeout?: number,
) => void;
// when the table is a tuple or array
<T>(table: ReadonlyArray<T>): (
<T>(
table: ReadonlyArray<T>,
): (
name: string | NameLike,
fn: (arg: T, done: DoneFn) => ReturnType<EachFn>,
timeout?: number,
) => void;
// when the table is a template literal
<T = unknown>(strings: TemplateStringsArray, ...expressions: Array<T>): (
<T = unknown>(
strings: TemplateStringsArray,
...expressions: Array<T>
): (
name: string | NameLike,
fn: (arg: Record<string, T>, done: DoneFn) => ReturnType<EachFn>,
timeout?: number,
@@ -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', {
+1 -1
View File
@@ -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,
});
@@ -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`
@@ -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`
@@ -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`
@@ -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`
+24 -10
View File
@@ -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
@@ -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,13 +6553,14 @@ __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
"@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 +9425,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 +17302,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: