-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathblockNcc.test.ts
107 lines (100 loc) · 2.39 KB
/
blockNcc.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { testBlock } from "bingo-stratum-testers";
import { describe, expect, test } from "vitest";
import { blockNcc } from "./blockNcc.js";
import { optionsBase } from "./options.fakes.js";
describe("blockNcc", () => {
test("production", () => {
const creation = testBlock(blockNcc, {
options: optionsBase,
});
expect(creation).toMatchInlineSnapshot(`
{
"addons": [
{
"addons": {
"ignores": [
"dist",
],
},
"block": [Function],
},
{
"addons": {
"sections": {
"Building": {
"contents": "
Run [TypeScript](https://typescriptlang.org) locally to type check and build source files from \`src/\` into output files in \`lib/\`:
\`\`\`shell
pnpm build
\`\`\`
Add \`--watch\` to run the builder in a watch mode that continuously cleans and recreates \`lib/\` as you save files:
\`\`\`shell
pnpm build --watch
\`\`\`
",
"innerSections": [
{
"contents": "
Run [\`@vercel/ncc\`](https://github.com/vercel/ncc) to create an output \`dist/\` to be used in production.
\`\`\`shell
pnpm build:release
\`\`\`
",
"heading": "Building for Release",
},
],
},
},
},
"block": [Function],
},
{
"addons": {
"ignores": [
"dist",
],
},
"block": [Function],
},
{
"addons": {
"jobs": [
{
"name": "Build",
"steps": [
{
"run": "pnpm build",
},
],
},
{
"name": "Build (Release)",
"steps": [
{
"run": "pnpm build:release",
},
],
},
],
},
"block": [Function],
},
{
"addons": {
"properties": {
"devDependencies": {
"@vercel/ncc": "^0.38.3",
},
"scripts": {
"build": "tsc",
"build:release": "ncc build src/index.ts -o dist",
},
},
},
"block": [Function],
},
],
}
`);
});
});