-
Notifications
You must be signed in to change notification settings - Fork 384
/
Copy pathframework-detection.test.js.snap
195 lines (159 loc) · 9.45 KB
/
framework-detection.test.js.snap
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`frameworks/framework-detection > should default to process.cwd() and static server 1`] = `
"◈ Netlify Dev ◈
◈ No app server detected. Using simple static server
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"should-default-to-process-cwd-and-static-server\\"
◈ Setting up local development server
◈ Static server listening to 88888
┌──────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:88888 │
│ │
└──────────────────────────────────────────────────┘"
`;
exports[`frameworks/framework-detection > should detect a known framework 1`] = `
"◈ Netlify Dev ◈
◈ Setting up local development server
◈ Starting Netlify Dev with Create React App
> start
> react-scripts start
◈ Command failed with exit code *: npm run start. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should filter frameworks with no dev command 1`] = `
"◈ Netlify Dev ◈
◈ No app server detected. Using simple static server
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"should-filter-frameworks-with-no-dev-command\\"
◈ Setting up local development server
◈ Static server listening to 88888
┌──────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:88888 │
│ │
└──────────────────────────────────────────────────┘"
`;
exports[`frameworks/framework-detection > should force a specific framework when configured 1`] = `
"◈ Netlify Dev ◈
◈ Setting up local development server
◈ Starting Netlify Dev with Create React App
◈ Failed running command: react-scripts start. Please verify 'react-scripts' exists"
`;
exports[`frameworks/framework-detection > should not run framework detection if command and targetPort are configured 1`] = `
"◈ Netlify Dev ◈
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Setting up local development server
◈ Starting Netlify Dev with custom config
hello
◈ \\"echo hello\\" exited with code *. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should pass framework-info env to framework sub process 1`] = `
"◈ Netlify Dev ◈
◈ Setting up local development server
◈ Starting Netlify Dev with Nuxt 3
> dev
> node -p process.env.NODE_VERSION
18
◈ \\"npm run dev\\" exited with code *. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should print specific error when command doesn't exist 1`] = `
"◈ Netlify Dev ◈
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Setting up local development server
◈ Starting Netlify Dev with #custom
◈ Failed running command: oops-i-did-it-again forgot-to-use-a-valid-command. Please verify 'oops-i-did-it-again' exists"
`;
exports[`frameworks/framework-detection > should prompt when multiple frameworks are detected 1`] = `
"◈ Netlify Dev ◈
? Multiple possible dev commands found (Use arrow keys or type to search)
> [Gatsby] 'npm run develop'
[Create React App] 'npm run start' [2A[37D[73C[2B[2K[1A[2K[1A[2K[G? Multiple possible dev commands found
[Gatsby] 'npm run develop'
> [Create React App] 'npm run start' [2A[37D[39C[2B[2K[1A[2K[1A[2K[G? Multiple possible dev commands found Create React App-npm run start[69D[69C
Update your netlify.toml to avoid this selection prompt next time:
[build]
command = \\"react-scripts build\\"
publish = \\"build\\"
[dev]
command = \\"npm run start\\"
◈ Setting up local development server
◈ Starting Netlify Dev with Create React App
> start
> react-scripts start
◈ Command failed with exit code *: npm run start. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should run \`command\` when both \`command\` and \`targetPort\` are configured 1`] = `
"◈ Netlify Dev ◈
◈ Setting up local development server
◈ Starting Netlify Dev with custom config
hello
◈ \\"echo hello\\" exited with code *. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should start custom command if framework=#custom, command and targetPort are configured 1`] = `
"◈ Netlify Dev ◈
◈ Setting up local development server
◈ Starting Netlify Dev with #custom
hello
◈ \\"echo hello\\" exited with code *. Shutting down Netlify Dev server"
`;
exports[`frameworks/framework-detection > should throw if framework=#custom but command is missing 1`] = `
"◈ Netlify Dev ◈
◈ 'command' and 'targetPort' properties are required when 'framework' is set to '#custom'"
`;
exports[`frameworks/framework-detection > should throw if framework=#custom but targetPort is missing 1`] = `
"◈ Netlify Dev ◈
◈ 'command' and 'targetPort' properties are required when 'framework' is set to '#custom'"
`;
exports[`frameworks/framework-detection > should throw when forcing a non supported framework 1`] = `
"◈ Netlify Dev ◈
◈ Invalid framework \\"to-infinity-and-beyond-js\\". It should be one of: *"
`;
exports[`frameworks/framework-detection > should use static server when --dir flag is passed 1`] = `
"◈ Netlify Dev ◈
◈ Using simple static server because '--dir' flag was specified
◈ Running static server from \\"should-use-static-server-when-dir-flag-is-passed/public\\"
◈ Setting up local development server
◈ Static server listening to 88888
┌──────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:88888 │
│ │
└──────────────────────────────────────────────────┘"
`;
exports[`frameworks/framework-detection > should use static server when framework is set to #static 1`] = `
"◈ Netlify Dev ◈
◈ Using simple static server because '[dev.framework]' was set to '#static'
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"should-use-static-server-when-framework-is-set-to-static\\"
◈ Setting up local development server
◈ Static server listening to 88888
┌──────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:88888 │
│ │
└──────────────────────────────────────────────────┘"
`;
exports[`frameworks/framework-detection > should warn if using static server and \`targetPort\` is configured 1`] = `
"◈ Netlify Dev ◈
◈ Using simple static server because '--dir' flag was specified
◈ Ignoring 'targetPort' setting since using a simple static server.
◈ Use --staticServerPort or [dev.staticServerPort] to configure the static server port
◈ Running static server from \\"should-warn-if-using-static-server-and-target-port-is-configured/public\\"
◈ Setting up local development server
◈ Static server listening to 88888
┌──────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:88888 │
│ │
└──────────────────────────────────────────────────┘"
`;