forked from pingdotgg/t3code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoActiveThreadState.test.ts
More file actions
45 lines (40 loc) · 1.13 KB
/
Copy pathNoActiveThreadState.test.ts
File metadata and controls
45 lines (40 loc) · 1.13 KB
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
import { describe, expect, it } from "vitest";
import { shouldShowNoActiveThreadSidebarTrigger } from "./NoActiveThreadState";
describe("shouldShowNoActiveThreadSidebarTrigger", () => {
it("shows the trigger when the mobile sidebar sheet is closed", () => {
expect(
shouldShowNoActiveThreadSidebarTrigger({
isMobile: true,
open: true,
openMobile: false,
}),
).toBe(true);
});
it("hides the trigger when the mobile sidebar sheet is already open", () => {
expect(
shouldShowNoActiveThreadSidebarTrigger({
isMobile: true,
open: true,
openMobile: true,
}),
).toBe(false);
});
it("shows the trigger when the desktop sidebar is collapsed", () => {
expect(
shouldShowNoActiveThreadSidebarTrigger({
isMobile: false,
open: false,
openMobile: false,
}),
).toBe(true);
});
it("hides the trigger when the desktop sidebar is expanded", () => {
expect(
shouldShowNoActiveThreadSidebarTrigger({
isMobile: false,
open: true,
openMobile: false,
}),
).toBe(false);
});
});