Fix C&P issue in test

One test was duplicated. The intention of the function is to match identical strings and any case mismatch, hence that's 4 cases.
This commit is contained in:
Alexander Grund 2024-09-02 09:41:41 +02:00 committed by GitHub
parent ffc1e903e1
commit 7a60b76486
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,9 +10,11 @@ test('Test matchesWithNodeName()', async ({ page }) => {
const elem1 = { nodeName: 'INPUT' };
const elem2 = { nodeName: 'input' };
expect(matchesWithNodeName(elem1, 'INPUT')).toBe(true);
expect(matchesWithNodeName(elem1, 'INPUT')).toBe(true);
expect(matchesWithNodeName(elem1, 'input')).toBe(true);
expect(matchesWithNodeName(elem2, 'INPUT')).toBe(true);
expect(matchesWithNodeName(elem2, 'input')).toBe(true);
expect(matchesWithNodeName(elem1, 'TEXT')).toBe(false);
expect(matchesWithNodeName(elem1, 'text')).toBe(false);
expect(matchesWithNodeName(undefined, 'INPUT')).toBe(false);
expect(matchesWithNodeName(undefined, undefined)).toBe(false);
});