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("names the URL and the purpose when the connection fails", async () => {
const cause = new TypeError("fetch failed");
vi.stubGlobal(
"fetch",
vi.fn(async () => {
throw cause;
}),
);
await expect(fetchEnvExample()).rejects.toThrow(
`Could not reach https://raw.githubusercontent.com/fells-code/seamless-auth-api/${SEAMLESS_AUTH_API_VERSION}/.env.example to read the auth server's env.example. Check your network connection.`,
);
await expect(fetchEnvExample()).rejects.toMatchObject({ cause });