Skip to content

Commit 844775b

Browse files
committed
test: fix
1 parent 14869f0 commit 844775b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/js/color-scheme-switch-three-states/switch-script.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe("ColorSchemeSwitchScript.js IIFE behavior (three states)", () => {
124124
window.inlineScripts.switchColorScheme();
125125

126126
expect(document.documentElement.classList.contains(DEFAULT_DARK)).toBe(true);
127-
expect(localStorage.getItem("colorScheme")).toBe(DEFAULT_SYSTEM);
127+
expect(localStorage.getItem("colorScheme")).toBe(null);
128128
});
129129

130130
it("transitions from light to system with light preference", () => {
@@ -134,7 +134,7 @@ describe("ColorSchemeSwitchScript.js IIFE behavior (three states)", () => {
134134
window.inlineScripts.switchColorScheme();
135135

136136
expect(document.documentElement.classList.contains(DEFAULT_DARK)).toBe(false);
137-
expect(localStorage.getItem("colorScheme")).toBe(DEFAULT_SYSTEM);
137+
expect(localStorage.getItem("colorScheme")).toBe(null);
138138
});
139139

140140
it("transitions from light to system with no preference", () => {
@@ -144,7 +144,7 @@ describe("ColorSchemeSwitchScript.js IIFE behavior (three states)", () => {
144144
window.inlineScripts.switchColorScheme();
145145

146146
expect(document.documentElement.classList.contains(DEFAULT_DARK)).toBe(false);
147-
expect(localStorage.getItem("colorScheme")).toBe(DEFAULT_SYSTEM);
147+
expect(localStorage.getItem("colorScheme")).toBe(null);
148148
});
149149

150150
it("transitions from system to dark", () => {
@@ -180,7 +180,7 @@ describe("ColorSchemeSwitchScript.js IIFE behavior (three states)", () => {
180180

181181
// Light -> System (with dark preference)
182182
window.inlineScripts.switchColorScheme();
183-
expect(localStorage.getItem("colorScheme")).toBe(DEFAULT_SYSTEM);
183+
expect(localStorage.getItem("colorScheme")).toBe(null);
184184
expect(document.documentElement.classList.contains(DEFAULT_DARK)).toBe(true);
185185

186186
// System -> Dark

0 commit comments

Comments
 (0)