Skip to content

Commit 1918ef5

Browse files
committed
feat: move parser-options-project to vitest
1 parent 4f1c036 commit 1918ef5

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

test/define-custom-blocks-visitor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { assert, describe, it } from "vitest"
1313
import { Linter } from "eslint"
1414
import { builtinRules } from "eslint/use-at-your-own-risk"
1515
import jsonParser from "jsonc-eslint-parser"
16-
import espree from "espree"
16+
import * as espree from "espree"
1717
import * as parser from "../src"
1818
import type { Program } from "estree"
1919

test/parser-options-project.js renamed to test/parser-options-project.test.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
"use strict"
2-
3-
const assert = require("assert")
4-
const { parseForESLint } = require("../src")
5-
const espree = require("espree")
1+
import { describe, it, assert } from "vitest"
2+
import { parseForESLint } from "../src"
3+
import * as espree from "espree"
4+
import type { Linter } from "eslint"
65

76
describe("use `project: undefined` when parsing template script-let", () => {
87
it("should be the project option is defined only once in Simple SFC.", () => {
@@ -39,7 +38,7 @@ describe("use `project: undefined` when parsing template script-let", () => {
3938
ast: espree.parse(code, options),
4039
}
4140
},
42-
},
41+
} satisfies Linter.Parser,
4342
},
4443
)
4544
assert.strictEqual(projectCount, 1)
@@ -83,7 +82,7 @@ describe("use `project: undefined` when parsing template script-let", () => {
8382
ast: espree.parse(code, options),
8483
}
8584
},
86-
},
85+
} satisfies Linter.Parser,
8786
},
8887
)
8988
assert.strictEqual(projectCount, 1)
@@ -126,7 +125,7 @@ describe("use `project: undefined` when parsing template script-let", () => {
126125
ast: espree.parse(code, options),
127126
}
128127
},
129-
},
128+
} satisfies Linter.Parser,
130129
},
131130
)
132131
assert.strictEqual(projectCount, 1)

vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineConfig } from "vitest/config"
33
export default defineConfig({
44
test: {
55
include: [
6-
"test/{parser-options,crlf,define-document-visitor,define-custom-blocks-visitor}.test.ts",
6+
"test/{parser-options,crlf,define-document-visitor,define-custom-blocks-visitor,parser-options-project}.test.ts",
77
],
88
},
99
})

0 commit comments

Comments
 (0)