Skip to content

Commit

Permalink
chore: add failing test to elseConditions rule for #351
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Pena committed Sep 27, 2024
1 parent 7b2d5d9 commit 7eac537
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/rules/rrd/elseCondition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,19 @@ describe('checkElseCondition', () => {
expect(result.length).toBe(0)
expect(result).toStrictEqual([])
})

it.todo('should not report files with the word else in a static text', () => {
const script = {
content: `
<script setup>
const text = 'else'
</script>
`,
} as SFCScriptBlock
const fileName = 'static-text-else.vue'
checkElseCondition(script, fileName)
const result = reportElseCondition()
expect(result.length).toBe(0)
expect(result).toStrictEqual([])
})
})

0 comments on commit 7eac537

Please sign in to comment.