1- import { describe , it , expect , vi , afterEach } from "vitest" ;
1+ import { describe , it , expect } from "vitest" ;
22import { createRoot , createSignal } from "solid-js" ;
33import { createReorderHighlight } from "../../src/app/lib/reorderHighlight" ;
44
55describe ( "createReorderHighlight" , ( ) => {
6- afterEach ( ( ) => { vi . useRealTimers ( ) ; } ) ;
7-
86 it ( "returns an accessor that starts as empty set" , ( ) => {
97 createRoot ( ( dispose ) => {
108 const [ order ] = createSignal < string [ ] > ( [ "a" , "b" ] ) ;
@@ -30,19 +28,4 @@ describe("createReorderHighlight", () => {
3028 } ) ;
3129 } ) ;
3230
33- it ( "registers onCleanup for timeout disposal" , ( ) => {
34- vi . useFakeTimers ( ) ;
35- createRoot ( ( dispose ) => {
36- const [ order ] = createSignal < string [ ] > ( [ "a" , "b" ] ) ;
37- const [ locked ] = createSignal < string [ ] > ( [ ] ) ;
38- const highlighted = createReorderHighlight ( order , locked ) ;
39-
40- // Verify the returned accessor is usable within the root
41- expect ( highlighted ( ) ) . toBeInstanceOf ( Set ) ;
42- expect ( highlighted ( ) . size ) . toBe ( 0 ) ;
43-
44- // Dispose should not throw (onCleanup is registered correctly)
45- dispose ( ) ;
46- } ) ;
47- } ) ;
4831} ) ;
0 commit comments