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.
This commit is contained in:
Kit Langton 2026-07-17 23:55:09 -04:00
commit 7a4054559d

View file

@ -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)