-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathfeedback.test.ts
More file actions
27 lines (26 loc) · 889 Bytes
/
feedback.test.ts
File metadata and controls
27 lines (26 loc) · 889 Bytes
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
import { describe, expect, test } from "bun:test";
import { formatFeedbackHint } from "../../../src/lib/init/feedback.js";
describe("formatFeedbackHint", () => {
test("maps init outcomes to copy-paste feedback commands", () => {
expect(formatFeedbackHint("success")).toBe(
[
"Tell us what felt great or rough:",
'$ sentry cli feedback "sentry init worked well"',
].join("\n")
);
expect(formatFeedbackHint("cancelled")).toBe(
[
"Sad to see setup stop. Was something going sideways?",
"Tell us so we can fix it:",
'$ sentry cli feedback "sentry init was cancelled"',
].join("\n")
);
expect(formatFeedbackHint("failed")).toBe(
[
"Setup hit a wall.",
"Tell us what happened so we can fix it:",
'$ sentry cli feedback "sentry init failed"',
].join("\n")
);
});
});