Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mts as a typescript extension #478

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix windows tests
  • Loading branch information
TylerJang27 committed Sep 19, 2023
commit 59ffe36babc8caafdc457c1fd260660cb73c9c9f
5 changes: 3 additions & 2 deletions tests/repo_tests/test_coverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ describe("All linters must have tests", () => {
const stdout = execSync("npm test -- --listTests", { cwd: REPO_ROOT }).toString();
const testFiles = stdout
.split("\n")
.filter((file) => file.startsWith("/"))
.filter((file) => file.startsWith("/") || file.match(/[A-Z]:\\/))
.map((file) => path.relative(REPO_ROOT, file));

// Key the tests by their linter subdirectory
const testDirMap = testFiles.reduce((accumulator: Map<string, string[]>, file: string) => {
const linterSubdir = file.match(/linters\/[^/]+/);
const linterSubdir =
process.platform === "win32" ? file.match(/linters\\[^\\]+/) : file.match(/linters\/[^/]+/);
if (linterSubdir) {
const matches = accumulator.get(linterSubdir[0]) ?? [];
accumulator.set(linterSubdir[0], [...matches, file]);
Expand Down