1
0
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:
2022-12-26 22:44:32 +05:00
parent c5ead229a9
commit 80c90ebda1

View 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)
})
})