1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-04 11:20:04 +00:00

chore(*): organise rules into folders by type

This commit is contained in:
Krishna Acondy
2021-04-07 16:34:33 +01:00
parent cc33ebb6e6
commit c9b6c3af95
26 changed files with 80 additions and 66 deletions

View File

@@ -0,0 +1,22 @@
import { Severity } from '../../types/Severity'
import { noTrailingSpaces } from './noTrailingSpaces'
describe('noTrailingSpaces', () => {
it('should return an empty array when the line has no trailing spaces', () => {
const line = "%put 'hello';"
expect(noTrailingSpaces.test(line, 1)).toEqual([])
})
it('should return an array with a single diagnostic when the line has trailing spaces', () => {
const line = "%put 'hello'; "
expect(noTrailingSpaces.test(line, 1)).toEqual([
{
message: 'Line contains trailing spaces',
lineNumber: 1,
startColumnNumber: 14,
endColumnNumber: 15,
severity: Severity.Warning
}
])
})
})