Skip to content

Commit a24832c

Browse files
committed
fix tests
1 parent 19333c0 commit a24832c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

special-pages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "node index.mjs",
1111
"build.dev": "npm run build -- --env development",
1212
"lint-fix": "cd ../ && npm run lint-fix",
13-
"test-unit": "node --test 'unit-test/*' 'pages/history/unit-tests/*' 'pages/duckplayer/unit-tests/*' pages/new-tab/app/freemium-pir-banner/unit-tests/utils.spec.mjs",
13+
"test-unit": "node --test \"unit-test/*\" \"pages/history/unit-tests/*\" \"pages/duckplayer/unit-tests/*\" \"pages/new-tab/app/freemium-pir-banner/unit-tests/*\"",
1414
"test-int": "npm run test-unit && npm run build.dev && playwright test --grep-invert '@screenshots'",
1515
"test-int-x": "npm run test-int",
1616
"test.screenshots": "npm run test-unit && npm run build.dev && playwright test --grep '@screenshots'",

special-pages/pages/history/unit-tests/useSelectionState.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test.describe('reducer function', () => {
3434
const result = reducer(prevState, action);
3535
deepEqual(result, {
3636
...defaultState,
37-
lastAction: 'reset',
37+
lastAction: null,
3838
});
3939
});
4040

@@ -51,7 +51,7 @@ test.describe('reducer function', () => {
5151
focusedIndex: 2,
5252
lastShiftRange: { start: null, end: null },
5353
selected: new Set([2]),
54-
lastAction: 'move-selection',
54+
lastAction: null,
5555
});
5656
});
5757

@@ -68,7 +68,7 @@ test.describe('reducer function', () => {
6868
focusedIndex: 4,
6969
lastShiftRange: { start: null, end: null },
7070
selected: new Set([4]),
71-
lastAction: 'move-selection',
71+
lastAction: null,
7272
});
7373
});
7474

@@ -82,7 +82,7 @@ test.describe('reducer function', () => {
8282
focusedIndex: 2,
8383
lastShiftRange: { start: null, end: null },
8484
selected: new Set([2]),
85-
lastAction: 'select-index',
85+
lastAction: null,
8686
});
8787
});
8888

@@ -96,7 +96,7 @@ test.describe('reducer function', () => {
9696
focusedIndex: 2,
9797
lastShiftRange: { start: null, end: null },
9898
selected: new Set([1, 2]),
99-
lastAction: 'toggle-index',
99+
lastAction: null,
100100
});
101101
});
102102

@@ -110,7 +110,7 @@ test.describe('reducer function', () => {
110110
focusedIndex: 2,
111111
lastShiftRange: { start: null, end: null },
112112
selected: new Set([1]),
113-
lastAction: 'toggle-index',
113+
lastAction: null,
114114
});
115115
});
116116

@@ -124,7 +124,7 @@ test.describe('reducer function', () => {
124124
lastShiftRange: { start: 1, end: 4 },
125125
focusedIndex: 4,
126126
selected: new Set([1, 2, 3, 4]),
127-
lastAction: 'expand-selected-to-index',
127+
lastAction: null,
128128
});
129129
});
130130

@@ -143,7 +143,7 @@ test.describe('reducer function', () => {
143143
focusedIndex: 2,
144144
lastShiftRange: { start: 2, end: 3 },
145145
selected: new Set([2, 3]),
146-
lastAction: 'increment-selection',
146+
lastAction: null,
147147
});
148148
});
149149

@@ -162,7 +162,7 @@ test.describe('reducer function', () => {
162162
focusedIndex: 3,
163163
lastShiftRange: { start: 2, end: 3 },
164164
selected: new Set([2, 3]),
165-
lastAction: 'increment-selection',
165+
lastAction: null,
166166
});
167167
});
168168
});

0 commit comments

Comments
 (0)