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:
parent
9da20b3e9f
commit
41a24a9973
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ describe("Solid adapter", () => {
|
||||||
expect(values).toEqual(["one", "ONE", "two", "TWO"])
|
expect(values).toEqual(["one", "ONE", "two", "TWO"])
|
||||||
|
|
||||||
function track(slot: Readable<{ readonly id: number; readonly value: string }>, index: number) {
|
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) => {
|
slot.subscribe = (listener) => {
|
||||||
active[index]++
|
active[index]++
|
||||||
const dispose = subscribe(listener)
|
const dispose = subscribe(listener)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue