newNode: RenderNode | RenderFragment,
refNode: RenderNode | RenderFragment | null
) {
- // TODO special case for Fragment
if (refNode === null) {
appendChild(container, newNode)
} else {
it('should allow explicitly recursive raw function loops', () => {
const counter = observable({ num: 0 })
-
- // TODO: this should be changed to autorun loops, can it be done?
const numSpy = jest.fn(() => {
counter.num++
if (counter.num < 10) {
}
})
autorun(numSpy)
-
expect(counter.num).toEqual(10)
expect(numSpy).toHaveBeenCalledTimes(10)
})