-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathlogin.test.ts.snap
77 lines (66 loc) · 1.98 KB
/
login.test.ts.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
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`rdme login > should bypass prompts and post to /login on the API if passing in every opt (no 2FA) 1`] = `
{
"result": "Successfully logged in as [email protected] to the subdomain project.",
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should bypass prompts and post to /login on the API if passing in every opt 1`] = `
{
"result": "Successfully logged in as [email protected] to the subdomain project.",
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should error if email is invalid 1`] = `
{
"error": [Error: You must provide a valid email address.],
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should error if invalid credentials are given 1`] = `
{
"error": [APIv1Error: Either your email address or password is incorrect
If you need help, email support@readme.io and mention log "fake-metrics-uuid".],
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should error if no project provided 1`] = `
{
"error": [Error: No project subdomain provided. Please use \`--project\`.],
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should error if trying to access a project that is not yours 1`] = `
{
"error": [APIv1Error: The project (unauthorized-project) can't be found.
If you need help, email support@readme.io],
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should make additional prompt for token if login requires 2FA 1`] = `
{
"result": "Successfully logged in as [email protected] to the subdomain project.",
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should post to /login on the API 1`] = `
{
"result": "Successfully logged in as [email protected] to the subdomain project.",
"stderr": "",
"stdout": "",
}
`;
exports[`rdme login > should post to /login on the API if passing in project via opt 1`] = `
{
"result": "Successfully logged in as [email protected] to the subdomain project.",
"stderr": "",
"stdout": "",
}
`;