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

fix: comments within/outside the statement

This commit is contained in:
Saad Jutt
2021-05-20 22:41:16 +05:00
parent 482ecec150
commit d7721f8e5e
2 changed files with 21 additions and 0 deletions

View File

@@ -7,6 +7,15 @@ describe('trimComments', () => {
/* some comment */ some code;
`)
).toEqual({ statement: 'some code;', commentStarted: false })
expect(
trimComments(`/* some comment */
/* some comment */ CODE_Keyword1 /* some comment */ CODE_Keyword2/* some comment */;/* some comment */
/* some comment */`)
).toEqual({
statement: 'CODE_Keyword1 CODE_Keyword2;',
commentStarted: false
})
})
it('should return statment, having multi-line comment', () => {