Skip to content

Commit 382fa42

Browse files
natemoo-regithub-actions[bot]
authored andcommitted
[ci] format
1 parent f9d1c06 commit 382fa42

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/commands/test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import type { CommandContext } from "../context.ts";
55
import { local } from "../utils.ts";
66

77
function resolveConfig(): string {
8-
// Built output (.mjs) or source (.ts)
9-
for (const ext of [".mjs", ".ts"]) {
10-
const url = new URL(`../test-utils/vitest.config${ext}`, import.meta.url);
11-
const path = fileURLToPath(url);
12-
if (existsSync(path)) return path;
13-
}
14-
throw new Error("Could not resolve vitest.config file");
8+
// Built output (.mjs) or source (.ts)
9+
for (const ext of [".mjs", ".ts"]) {
10+
const url = new URL(`../test-utils/vitest.config${ext}`, import.meta.url);
11+
const path = fileURLToPath(url);
12+
if (existsSync(path)) return path;
13+
}
14+
throw new Error("Could not resolve vitest.config file");
1515
}
1616

1717
export async function test(ctx: CommandContext) {
18-
const stdio = x(local("vitest"), ["run", "--config", resolveConfig(), ...ctx.args]);
18+
const stdio = x(local("vitest"), ["run", "--config", resolveConfig(), ...ctx.args]);
1919

20-
for await (const line of stdio) {
21-
console.log(line);
22-
}
20+
for await (const line of stdio) {
21+
console.log(line);
22+
}
2323
}

0 commit comments

Comments
 (0)