Skip to content

Commit 25c9627

Browse files
committed
Simplified tests
1 parent b10d4ea commit 25c9627

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

src/rules/prefer-web-first-assertions.test.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -871,31 +871,6 @@ runRuleTester('prefer-web-first-assertions', rule, {
871871
await expect(fooLocatorText).toHaveText('foo');
872872
`),
873873
},
874-
{
875-
code: test(`
876-
const fooLocator = page.locator('.fooClass');
877-
let fooLocatorText = await fooLocator.allInnerTexts();
878-
expect(fooLocatorText).toEqual('foo');
879-
fooLocatorText = 'foo';
880-
expect(fooLocatorText).toEqual('foo');
881-
`),
882-
errors: [
883-
{
884-
column: 9,
885-
data: { matcher: 'toHaveText', method: 'allInnerTexts' },
886-
endColumn: 31,
887-
line: 4,
888-
messageId: 'useWebFirstAssertion',
889-
},
890-
],
891-
output: test(`
892-
const fooLocator = page.locator('.fooClass');
893-
let fooLocatorText = fooLocator;
894-
await expect(fooLocatorText).toHaveText('foo');
895-
fooLocatorText = 'foo';
896-
expect(fooLocatorText).toEqual('foo');
897-
`),
898-
},
899874
{
900875
code: test(`
901876
let fooLocatorText;
@@ -921,33 +896,6 @@ runRuleTester('prefer-web-first-assertions', rule, {
921896
await expect(fooLocatorText).toHaveText('foo');
922897
`),
923898
},
924-
{
925-
code: test(`
926-
let fooLocatorText;
927-
let fooLocatorText2;
928-
const fooLocator = page.locator('.fooClass');
929-
fooLocatorText = await fooLocator.allInnerTexts();
930-
fooLocatorText2 = await fooLocator.allInnerTexts();
931-
expect(fooLocatorText).toEqual('foo');
932-
`),
933-
errors: [
934-
{
935-
column: 9,
936-
data: { matcher: 'toHaveText', method: 'allInnerTexts' },
937-
endColumn: 31,
938-
line: 7,
939-
messageId: 'useWebFirstAssertion',
940-
},
941-
],
942-
output: test(`
943-
let fooLocatorText;
944-
let fooLocatorText2;
945-
const fooLocator = page.locator('.fooClass');
946-
fooLocatorText = fooLocator;
947-
fooLocatorText2 = await fooLocator.allInnerTexts();
948-
await expect(fooLocatorText).toHaveText('foo');
949-
`),
950-
},
951899
{
952900
code: test(`
953901
let fooLocatorText;

0 commit comments

Comments
 (0)