-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathbase.test.ts
57 lines (54 loc) · 1.9 KB
/
base.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { prepareOptions } from "bingo";
import { readFile } from "fs/promises";
import { describe, expect, test } from "vitest";
import { base } from "./base.js";
import { AllContributorsData } from "./types.js";
describe("base", () => {
test("production from create-typescript-app", async () => {
const options = await prepareOptions(base);
expect(options).toEqual({
access: "public",
author: "Josh Goldberg ✨",
bin: "bin/index.js",
contributors: (
JSON.parse(
(await readFile(".all-contributorsrc")).toString(),
) as AllContributorsData
).contributors,
description:
"Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
documentation: "",
email: {
github: "[email protected]",
npm: "[email protected]",
},
explainer: [
`\`create-typescript-app\` is a one-stop-shop solution to set up a new or existing repository with the latest and greatest TypeScript tooling.`,
`It includes options not just for building and testing but also automated release management, contributor recognition, GitHub repository settings, and more.`,
],
funding: "JoshuaKGoldberg",
guide: {
href: "https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository",
title: "Contributing to a create-typescript-app Repository",
},
login: "Josh Goldberg ✨",
logo: {
alt: "Project logo: the TypeScript blue square with rounded corners, but a plus sign instead of 'TS'",
height: 128,
src: "./docs/create-typescript-app.png",
width: 128,
},
node: {
minimum: expect.any(String),
pinned: expect.any(String),
},
owner: "JoshuaKGoldberg",
packageData: expect.any(Object),
pnpm: expect.any(String),
repository: "create-typescript-app",
title: "Create TypeScript App",
usage: expect.any(String),
version: expect.any(String),
});
});
});