chore: remove references to jest expand
This commit is contained in:
parent
964fe66ccc
commit
ab0d066c0b
|
|
@ -25,9 +25,6 @@ import type { Locator } from 'playwright-core';
|
||||||
const EXPECTED_LABEL = 'Expected';
|
const EXPECTED_LABEL = 'Expected';
|
||||||
const RECEIVED_LABEL = 'Received';
|
const RECEIVED_LABEL = 'Received';
|
||||||
|
|
||||||
// The optional property of matcher context is true if undefined.
|
|
||||||
const isExpand = (expand?: boolean): boolean => expand !== false;
|
|
||||||
|
|
||||||
export async function toEqual<T>(
|
export async function toEqual<T>(
|
||||||
this: ExpectMatcherContext,
|
this: ExpectMatcherContext,
|
||||||
matcherName: string,
|
matcherName: string,
|
||||||
|
|
@ -61,7 +58,7 @@ export async function toEqual<T>(
|
||||||
received,
|
received,
|
||||||
EXPECTED_LABEL,
|
EXPECTED_LABEL,
|
||||||
RECEIVED_LABEL,
|
RECEIVED_LABEL,
|
||||||
isExpand(this.expand),
|
false,
|
||||||
) + callLogText(log);
|
) + callLogText(log);
|
||||||
|
|
||||||
// Passing the actual and expected objects so that a custom reporter
|
// Passing the actual and expected objects so that a custom reporter
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ export async function toMatchText(
|
||||||
const labelExpected = `Expected ${typeof expected === 'string' ? stringSubstring : 'pattern'}`;
|
const labelExpected = `Expected ${typeof expected === 'string' ? stringSubstring : 'pattern'}`;
|
||||||
if (notFound)
|
if (notFound)
|
||||||
return messagePrefix + `${labelExpected}: ${this.utils.printExpected(expected)}\nReceived: ${received}` + callLogText(log);
|
return messagePrefix + `${labelExpected}: ${this.utils.printExpected(expected)}\nReceived: ${received}` + callLogText(log);
|
||||||
return messagePrefix + this.utils.printDiffOrStringify(expected, receivedString, labelExpected, 'Received string', this.expand !== false) + callLogText(log);
|
return messagePrefix + this.utils.printDiffOrStringify(expected, receivedString, labelExpected, 'Received string', false) + callLogText(log);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue