Skip to content

Commit

Permalink
chore: add failing test to nestedTernary for #366
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Pena committed Oct 1, 2024
1 parent 315ce6d commit 9096827
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/rules/rrd/nestedTernary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ describe('checkNestedTernary', () => {
expect(result).toStrictEqual([])
})

it.todo('should not report files with ts optional symbol', () => {
const script = {
content: `
type TestType = { value?: number; name?: string }
const temp: Array<TestType> = []
`,
} as SFCScriptBlock
const fileName = 'nestedTernary.vue'
checkNestedTernary(script, fileName)
const result = reportNestedTernary()
expect(result.length).toBe(0)
expect(result).toStrictEqual([])
})

it('should report files with nested ternary', () => {
const script = {
content: `const pass = 'Gauranga%)'
Expand Down

0 comments on commit 9096827

Please sign in to comment.