Skip to content

Commit

Permalink
test update for new output
Browse files Browse the repository at this point in the history
  • Loading branch information
rrd108 committed Sep 3, 2024
1 parent 75faa8b commit ff36ed3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/rules/rrd/cyclomaticComplexity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('checkCyclomaticComplexity', () => {
file: fileName,
rule: `${TEXT_INFO}rrd ~ cyclomatic complexity${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/cyclomatic-complexity.html`,
message: `${BG_WARN}(6)${BG_RESET} 🚨`,
message: `Cyclomatic complexity is ${BG_WARN}high (6)${BG_RESET} 🚨`,
}])
})

Expand All @@ -47,7 +47,7 @@ describe('checkCyclomaticComplexity', () => {
file: fileName,
rule: `${TEXT_INFO}rrd ~ cyclomatic complexity${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/cyclomatic-complexity.html`,
message: `${BG_ERR}(11)${BG_RESET} 🚨`,
message: `Cyclomatic complexity is ${BG_ERR}very high (11)${BG_RESET} 🚨`,
}])
})
})
10 changes: 5 additions & 5 deletions src/rules/rrd/shortVariableName.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { beforeEach, describe, expect, it } from 'vitest'

import type { SFCScriptBlock } from '@vue/compiler-sfc'
import { BG_ERR, BG_RESET, TEXT_INFO, TEXT_RESET, TEXT_WARN } from '../asceeCodes'
import { BG_RESET, BG_WARN, TEXT_INFO, TEXT_RESET, TEXT_WARN } from '../asceeCodes'
import { MIN_VARIABLE_NAME, checkShortVariableName, reportShortVariableName, resetShortVariableName } from './shortVariableName'

describe('shortVariableName', () => {
Expand Down Expand Up @@ -40,7 +40,7 @@ describe('shortVariableName', () => {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(${variable})${BG_RESET} 🚨`,
message: `variable: ${BG_WARN}(${variable})${BG_RESET} 🚨`,
}])
})

Expand All @@ -63,17 +63,17 @@ describe('shortVariableName', () => {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(age)${BG_RESET} 🚨`,
message: `variable: ${BG_WARN}(age)${BG_RESET} 🚨`,
}, {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(gps)${BG_RESET} 🚨`,
message: `variable: ${BG_WARN}(gps)${BG_RESET} 🚨`,
}, {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(lng)${BG_RESET} 🚨`,
message: `variable: ${BG_WARN}(lng)${BG_RESET} 🚨`,
}])
})
})

0 comments on commit ff36ed3

Please sign in to comment.