1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-07 12:40:05 +00:00

chore: specs fix

This commit is contained in:
2022-12-29 00:49:40 +05:00
parent 24fba7867c
commit 636703b326
2 changed files with 4 additions and 12 deletions

View File

@@ -32,16 +32,8 @@ describe('formatFile', () => {
const expectedContent = `/**\r\n @file\r\n @brief <Your brief here>\r\n <h4> SAS Macros </h4>\r\n**/\r\n%macro somemacro();\r\n%put 'hello';\r\n%mend;` const expectedContent = `/**\r\n @file\r\n @brief <Your brief here>\r\n <h4> SAS Macros </h4>\r\n**/\r\n%macro somemacro();\r\n%put 'hello';\r\n%mend;`
const expectedResult = { const expectedResult = {
updatedFilePaths: [path.join(__dirname, 'format-file-config.sas')], updatedFilePaths: [path.join(__dirname, 'format-file-config.sas')],
fixedDiagnosticsCount: 2, fixedDiagnosticsCount: 4,
unfixedDiagnostics: [ unfixedDiagnostics: []
{
endColumnNumber: 7,
lineNumber: 8,
message: '%mend statement is missing macro name - somemacro',
severity: 1,
startColumnNumber: 1
}
]
} }
await createFile(path.join(__dirname, 'format-file-config.sas'), content) await createFile(path.join(__dirname, 'format-file-config.sas'), content)

View File

@@ -2,8 +2,8 @@ import * as fileModule from '@sasjs/utils/file'
import { LintConfig } from '../types/LintConfig' import { LintConfig } from '../types/LintConfig'
import { getLintConfig } from './getLintConfig' import { getLintConfig } from './getLintConfig'
const expectedFileLintRulesCount = 5 const expectedFileLintRulesCount = 6
const expectedLineLintRulesCount = 5 const expectedLineLintRulesCount = 6
const expectedPathLintRulesCount = 2 const expectedPathLintRulesCount = 2
describe('getLintConfig', () => { describe('getLintConfig', () => {