From 7a60b76486ec5f30f76819eb6d3363355f6d3563 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 2 Sep 2024 09:41:41 +0200 Subject: [PATCH] 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. --- tests/global.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/global.spec.ts b/tests/global.spec.ts index 1151be51..870465d9 100644 --- a/tests/global.spec.ts +++ b/tests/global.spec.ts @@ -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); });