Skip to content

Commit

Permalink
chore: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Sep 28, 2023
1 parent 82a518a commit a62b551
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/utils/misc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Rule } from 'eslint';

import { Settings } from './types';

export const getAmountData = (amount: number) => ({
Expand Down
24 changes: 12 additions & 12 deletions test/spec/expect-expect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,47 @@ runRuleTester('expect-expect', rule, {
errors: [{ messageId: 'noAssertions' }],
},
{
name: 'Global settings no false positives',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
})
`,
errors: [{ messageId: 'noAssertions' }],
name: 'Global settings no false positives',
settings: {
playwright: {
additionalAssertFunctionNames: ['wayComplexCustomCondition'],
},
},
},
{
name: 'Rule settings no false positives',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
})
`,
errors: [{ messageId: 'noAssertions' }],
name: 'Rule settings no false positives',
options: [
{ additionalAssertFunctionNames: ['wayComplexCustomCondition'] },
],
},
{
name: 'Global settings no false positives',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
})
`,
errors: [{ messageId: 'noAssertions' }],
name: 'Global settings no false positives',
options: [
{ additionalAssertFunctionNames: ['wayComplexRuleCustomCondition'] },
],
settings: {
playwright: {
additionalAssertFunctionNames: ['wayComplexGlobalCustomCondition'],
},
},
options: [
{ additionalAssertFunctionNames: ['wayComplexRuleCustomCondition'] },
],
},
],
valid: [
Expand All @@ -88,29 +88,28 @@ runRuleTester('expect-expect', rule, {
`,
},
{
name: 'Global settings only',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
})
`,
name: 'Global settings only',
settings: {
playwright: {
additionalAssertFunctionNames: ['assertCustomCondition'],
},
},
},
{
name: 'Rule settings only',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
})
`,
name: 'Rule settings only',
options: [{ additionalAssertFunctionNames: ['assertCustomCondition'] }],
},
{
name: 'Global and rule settings combine rather than override',
code: dedent`
test('should fail', async ({ page }) => {
await assertCustomCondition(page)
Expand All @@ -120,14 +119,15 @@ runRuleTester('expect-expect', rule, {
await wayComplexCustomCondition(page)
})
`,
name: 'Global and rule settings combine rather than override',
options: [
{ additionalAssertFunctionNames: ['wayComplexCustomCondition'] },
],
settings: {
playwright: {
additionalAssertFunctionNames: ['assertCustomCondition'],
},
},
options: [
{ additionalAssertFunctionNames: ['wayComplexCustomCondition'] },
],
},
],
});

0 comments on commit a62b551

Please sign in to comment.