mirror of
https://github.com/sasjs/lint.git
synced 2025-12-10 17:34:36 +00:00
chore: add specs
This commit is contained in:
15
src/rules/line/noGremlins.spec.ts
Normal file
15
src/rules/line/noGremlins.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Severity } from '../../types/Severity'
|
||||
import { noGremlins } from './noGremlins'
|
||||
|
||||
describe('noTabs', () => {
|
||||
it('should return an empty array when the line does not have any gremlin', () => {
|
||||
const line = "%put 'hello';"
|
||||
expect(noGremlins.test(line, 1)).toEqual([])
|
||||
})
|
||||
|
||||
it('should return a diagnostic array when the line contains gremlins', () => {
|
||||
const line = "– ‘ %put 'hello';"
|
||||
const diagnostics = noGremlins.test(line, 1)
|
||||
expect(diagnostics.length).toEqual(2)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user