Skip to content

Commit 09b56e7

Browse files
committed
fix(lint): type analyzer test cases explicitly
1 parent 94e5c0a commit 09b56e7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

packages/app/tests/eslint/no-lib-imports.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,15 @@ const expectMessages = (
5050
}
5151
}
5252

53+
type ViolationCase = readonly [
54+
name: string,
55+
source: string,
56+
expectedMessages: ReadonlyArray<ReadonlyArray<string>>,
57+
filePath?: string
58+
]
59+
5360
describe("noLibImportsRule", () => {
54-
const violationCases = [
61+
const violationCases: ReadonlyArray<ViolationCase> = [
5562
["rejects import declarations from lib", line("import { listProjects } from \"@effect-template/lib\""), [[
5663
"Direct import",
5764
"@effect-template/lib"
@@ -93,7 +100,7 @@ describe("noLibImportsRule", () => {
93100
["rejects migrated legacy paths too", line("import { listProjects } from \"@effect-template/lib\""), [[
94101
"Direct import"
95102
]], "src/docker-git/program.ts"]
96-
] as const
103+
]
97104

98105
for (const [name, source, expectedMessages, filePath] of violationCases) {
99106
it(name, () => {

0 commit comments

Comments
 (0)