The invocation is weird. And the following does not work:
const o = AssertOrder(2)
const cb = (i) => {
o.any([1,2])
o.on(2, () => expect(i).toBe(2))
}
cb(1)
cb(2)
It got i = 1.
The following works:
const o = AssertOrder(2)
const cb = (i) => {
o.on(2, () => expect(i).toBe(2))
o.any([1,2])
}
cb(1)
cb(2)
The invocation is weird. And the following does not work:
It got
i = 1.The following works: