Skip to content

Commit

Permalink
test: Add case for unknown extensions with ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir authored and fi3ework committed Oct 9, 2022
1 parent 712fb31 commit 674b2e1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions playground/multiple-hmr/__tests__/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ describe('multiple-hmr', () => {
expect(stringify(stable(diagnostics))).toMatchSnapshot()
// expect(stripedLog).toMatchSnapshot()
})

it('should ignore extensions that are not specified for ESLint', async () => {
const source = 'text-align: center;'
const target = 'text-align: right;'

console.log('-- edit the file --')
resetDiagnostics()
resetReceivedLog()
editFile('src/App.css', (code) => code.replace(source, target))
await sleepForEdit()
expect(diagnostics).toStrictEqual([])
expect(stripedLog).toBe('')

console.log('-- return to previous state --')
resetDiagnostics()
resetReceivedLog()
editFile('src/App.css', (code) => code.replace(target, source))
await sleepForEdit()
expect(diagnostics).toStrictEqual([])
expect(stripedLog).toBe('')
})
})

describe.runIf(isBuild)('build', () => {
Expand Down

0 comments on commit 674b2e1

Please sign in to comment.