Explorar el Código

test(quark): bind detached subscribe in solid adapter instrumentation

Wrapper methods are shared this-based functions after the standalone sync,
so the test's subscribe interception must bind before detaching.
Kit Langton hace 4 semanas
padre
commit
7a4054559d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/quark/test/solid.test.ts

+ 1 - 1
packages/quark/test/solid.test.ts

@@ -71,7 +71,7 @@ describe("Solid adapter", () => {
     expect(values).toEqual(["one", "ONE", "two", "TWO"])
 
     function track(slot: Readable<{ readonly id: number; readonly value: string }>, index: number) {
-      const subscribe = slot.subscribe
+      const subscribe = slot.subscribe.bind(slot)
       slot.subscribe = (listener) => {
         active[index]++
         const dispose = subscribe(listener)