You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("should not warn on invalid wrangler.toml when logging in",async()=>{
184
+
mockOAuthServerCallback("success");
185
+
186
+
letcounter=0;
187
+
msw.use(
188
+
http.post(
189
+
"*/oauth2/token",
190
+
async()=>{
191
+
counter+=1;
192
+
193
+
returnHttpResponse.json({
194
+
access_token: "test-access-token",
195
+
expires_in: 100000,
196
+
refresh_token: "test-refresh-token",
197
+
scope: "account:read",
198
+
});
199
+
},
200
+
{once: true}
201
+
)
202
+
);
203
+
204
+
// @ts-expect-error - intentionally invalid
205
+
writeWranglerToml({invalid: true});
206
+
207
+
awaitrunWrangler("login");
208
+
209
+
expect(counter).toBe(1);
210
+
expect(std.out).toMatchInlineSnapshot(`
211
+
"Attempting to login via OAuth...
212
+
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256
0 commit comments