Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
18
node_modules/playwright/lib/matchers/toMatchText.js
generated
vendored
18
node_modules/playwright/lib/matchers/toMatchText.js
generated
vendored
@@ -21,17 +21,15 @@ __export(toMatchText_exports, {
|
||||
toMatchText: () => toMatchText
|
||||
});
|
||||
module.exports = __toCommonJS(toMatchText_exports);
|
||||
var import_utils = require("playwright-core/lib/utils");
|
||||
var import_util = require("../util");
|
||||
var import_expect = require("./expect");
|
||||
var import_matcherHint = require("./matcherHint");
|
||||
var import_expectBundle = require("../common/expectBundle");
|
||||
async function toMatchText(matcherName, receiver, receiverType, query, expected, options = {}) {
|
||||
(0, import_util.expectTypes)(receiver, [receiverType], matcherName);
|
||||
const locator = receiverType === "Locator" ? receiver : void 0;
|
||||
if (!(typeof expected === "string") && !(expected && typeof expected.test === "function")) {
|
||||
const errorMessage2 = `Error: ${(0, import_expectBundle.EXPECTED_COLOR)("expected")} value must be a string or regular expression
|
||||
const errorMessage2 = `Error: ${this.utils.EXPECTED_COLOR("expected")} value must be a string or regular expression
|
||||
${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
|
||||
throw new Error((0, import_matcherHint.formatMatcherMessage)(this, { locator, matcherName, expectation: "expected", errorMessage: errorMessage2 }));
|
||||
throw new Error((0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, locator: locator?.toString(), matcherName, expectation: "expected", errorMessage: errorMessage2 }));
|
||||
}
|
||||
const timeout = options.timeout ?? this.timeout;
|
||||
const { matches: pass, received, log, timedOut, errorMessage } = await query(!!this.isNot, timeout);
|
||||
@@ -53,13 +51,13 @@ ${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
|
||||
if (typeof expected === "string") {
|
||||
printedExpected = `Expected${expectedSuffix}: not ${this.utils.printExpected(expected)}`;
|
||||
if (!errorMessage) {
|
||||
const formattedReceived = (0, import_expect.printReceivedStringContainExpectedSubstring)(receivedString, receivedString.indexOf(expected), expected.length);
|
||||
const formattedReceived = (0, import_utils.printReceivedStringContainExpectedSubstring)(this.utils, receivedString, receivedString.indexOf(expected), expected.length);
|
||||
printedReceived = `Received${receivedSuffix}: ${formattedReceived}`;
|
||||
}
|
||||
} else {
|
||||
printedExpected = `Expected${expectedSuffix}: not ${this.utils.printExpected(expected)}`;
|
||||
if (!errorMessage) {
|
||||
const formattedReceived = (0, import_expect.printReceivedStringContainExpectedResult)(receivedString, typeof expected.exec === "function" ? expected.exec(receivedString) : null);
|
||||
const formattedReceived = (0, import_utils.printReceivedStringContainExpectedResult)(this.utils, receivedString, typeof expected.exec === "function" ? expected.exec(receivedString) : null);
|
||||
printedReceived = `Received${receivedSuffix}: ${formattedReceived}`;
|
||||
}
|
||||
}
|
||||
@@ -70,10 +68,12 @@ ${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
|
||||
printedDiff = this.utils.printDiffOrStringify(expected, receivedString, `Expected${expectedSuffix}`, `Received${receivedSuffix}`, false);
|
||||
}
|
||||
const message = () => {
|
||||
return (0, import_matcherHint.formatMatcherMessage)(this, {
|
||||
return (0, import_utils.formatMatcherMessage)(this.utils, {
|
||||
promise: this.promise,
|
||||
isNot: this.isNot,
|
||||
matcherName,
|
||||
expectation: "expected",
|
||||
locator,
|
||||
locator: locator?.toString(),
|
||||
timeout,
|
||||
timedOut,
|
||||
printedExpected,
|
||||
|
||||
Reference in New Issue
Block a user