mirror of
https://github.com/sasjs/lint.git
synced 2026-01-14 15:50:05 +00:00
fix(*): Add severity, start and end column numbers for diagnostics, change warning to message
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as fileModule from '@sasjs/utils/file'
|
||||
import { LintConfig } from '../types/LintConfig'
|
||||
import { getLintConfig } from './getLintConfig'
|
||||
|
||||
@@ -7,4 +8,16 @@ describe('getLintConfig', () => {
|
||||
|
||||
expect(config).toBeInstanceOf(LintConfig)
|
||||
})
|
||||
|
||||
it('should get the default config when a .sasjslint file is unavailable', async () => {
|
||||
jest
|
||||
.spyOn(fileModule, 'readFile')
|
||||
.mockImplementationOnce(() => Promise.reject())
|
||||
|
||||
const config = await getLintConfig()
|
||||
|
||||
expect(config).toBeInstanceOf(LintConfig)
|
||||
expect(config.fileLintRules.length).toEqual(1)
|
||||
expect(config.lineLintRules.length).toEqual(2)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user