Skip to content

Commit 7c8c389

Browse files
natemoo-regithub-actions[bot]
authored andcommitted
[ci] format
1 parent ffba54e commit 7c8c389

File tree

9 files changed

+386
-386
lines changed

9 files changed

+386
-386
lines changed

src/commands/build.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import { build as tsdown } from "tsdown";
33
import type { CommandContext } from "../context.ts";
44

55
export async function build(ctx: CommandContext) {
6-
const args = parse(ctx.args, {
7-
boolean: ["bundle", "dts", "minify"],
8-
});
6+
const args = parse(ctx.args, {
7+
boolean: ["bundle", "dts", "minify"],
8+
});
99

10-
const entry = args._.length > 0 ? args._.map(String) : ["src/**/*.ts", "!src/**/*.test.ts"];
10+
const entry = args._.length > 0 ? args._.map(String) : ["src/**/*.ts", "!src/**/*.test.ts"];
1111

12-
await tsdown({
13-
config: false,
14-
entry,
15-
format: "esm",
16-
sourcemap: true,
17-
clean: true,
18-
unbundle: !args.bundle,
19-
dts: args.dts,
20-
minify: args.minify,
21-
});
12+
await tsdown({
13+
config: false,
14+
entry,
15+
format: "esm",
16+
sourcemap: true,
17+
clean: true,
18+
unbundle: !args.bundle,
19+
dts: args.dts,
20+
minify: args.minify,
21+
});
2222
}

src/commands/test-utils/fixture.test.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@ import { existsSync } from "node:fs";
33
import { createFixture } from "./fixture.ts";
44

55
describe("createFixture", () => {
6-
it("creates files on disk from inline tree", async () => {
7-
const fixture = await createFixture({
8-
"hello.txt": "hello world",
9-
});
10-
expect(await fixture.text("hello.txt")).toBe("hello world");
11-
});
6+
it("creates files on disk from inline tree", async () => {
7+
const fixture = await createFixture({
8+
"hello.txt": "hello world",
9+
});
10+
expect(await fixture.text("hello.txt")).toBe("hello world");
11+
});
1212

13-
it("creates nested directories from slash-separated keys", async () => {
14-
const fixture = await createFixture({
15-
"src/index.ts": "export const x = 1",
16-
"src/utils/helpers.ts": "export function help() {}",
17-
});
18-
expect(await fixture.isFile("src/index.ts")).toBe(true);
19-
expect(await fixture.isFile("src/utils/helpers.ts")).toBe(true);
20-
});
13+
it("creates nested directories from slash-separated keys", async () => {
14+
const fixture = await createFixture({
15+
"src/index.ts": "export const x = 1",
16+
"src/utils/helpers.ts": "export function help() {}",
17+
});
18+
expect(await fixture.isFile("src/index.ts")).toBe(true);
19+
expect(await fixture.isFile("src/utils/helpers.ts")).toBe(true);
20+
});
2121

22-
it("resolve returns absolute path within fixture root", async () => {
23-
const fixture = await createFixture({ "a.txt": "" });
24-
expect(fixture.resolve("a.txt").toString()).toContain(fixture.root.toString());
25-
});
22+
it("resolve returns absolute path within fixture root", async () => {
23+
const fixture = await createFixture({ "a.txt": "" });
24+
expect(fixture.resolve("a.txt").toString()).toContain(fixture.root.toString());
25+
});
2626

27-
it("text reads the actual file", async () => {
28-
const fixture = await createFixture({ "a.txt": "Empty" });
29-
expect(await fixture.text("a.txt")).toEqual("Empty");
30-
await fixture.write("a.txt", "Hello world!");
31-
expect(await fixture.text("a.txt")).toEqual("Hello world!");
32-
});
27+
it("text reads the actual file", async () => {
28+
const fixture = await createFixture({ "a.txt": "Empty" });
29+
expect(await fixture.text("a.txt")).toEqual("Empty");
30+
await fixture.write("a.txt", "Hello world!");
31+
expect(await fixture.text("a.txt")).toEqual("Hello world!");
32+
});
3333

34-
it("cleanup removes the temp directory", async () => {
35-
const fixture = await createFixture({ "a.txt": "" });
36-
const path = fixture.root;
37-
expect(await fixture.isDirectory(fixture.root)).toBe(true);
38-
await fixture.cleanup();
39-
expect(existsSync(path)).toBe(false);
40-
});
34+
it("cleanup removes the temp directory", async () => {
35+
const fixture = await createFixture({ "a.txt": "" });
36+
const path = fixture.root;
37+
expect(await fixture.isDirectory(fixture.root)).toBe(true);
38+
await fixture.cleanup();
39+
expect(existsSync(path)).toBe(false);
40+
});
4141
});

0 commit comments

Comments
 (0)