mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-21 18:26:09 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user