feat: add normalizeWhiteSpace flag to toHaveValue

This commit is contained in:
Pengoose 2025-02-19 02:14:49 +09:00
parent e43c309877
commit f9dd5357b6

View file

@ -355,7 +355,7 @@ export function toHaveValue(
options?: { timeout?: number },
) {
return toMatchText.call(this, 'toHaveValue', locator, 'Locator', async (isNot, timeout) => {
const expectedText = serializeExpectedTextValues([expected]);
const expectedText = serializeExpectedTextValues([expected], { normalizeWhiteSpace: true });
return await locator._expect('to.have.value', { expectedText, isNot, timeout });
}, expected, options);
}