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

fix(trimComments): handle case special comment case

This commit is contained in:
Saad Jutt
2021-05-21 18:05:22 +05:00
parent f793eb3a76
commit d391a4e8fc
2 changed files with 17 additions and 5 deletions

View File

@@ -8,6 +8,18 @@ describe('trimComments', () => {
`)
).toEqual({ statement: 'some code;', commentStarted: false })
expect(
trimComments(`
/*/ some comment */ some code;
`)
).toEqual({ statement: 'some code;', commentStarted: false })
expect(
trimComments(`
some code;/*/ some comment */ some code;
`)
).toEqual({ statement: 'some code; some code;', commentStarted: false })
expect(
trimComments(`/* some comment */
/* some comment */ CODE_Keyword1 /* some comment */ CODE_Keyword2/* some comment */;/* some comment */