src/types.test.ts 756 B raw
1
import { describe, it, expect } from "bun:test";
2
import type { TemplateInfo, ProjectOptions, ProjectResult } from "./types";
3
4
describe("TypeScript types", () => {
5
	it("should define correct type structures", () => {
6
		// Test that types can be instantiated correctly
7
		const templateInfo: TemplateInfo = {
8
			branch: "main",
9
			description: "Test template",
10
		};
11
12
		const options: ProjectOptions = {
13
			projectName: "test-project",
14
			linter: "biome",
15
		};
16
17
		const result: ProjectResult = {
18
			projectName: "test-project",
19
			gitInitialized: true,
20
			dependenciesInstalled: false,
21
			template: "default",
22
		};
23
24
		expect(templateInfo.branch).toBe("main");
25
		expect(options.linter).toBe("biome");
26
		expect(result.projectName).toBe("test-project");
27
	});
28
});