fix(test): update drag interaction test to match 454210a4's renderFunction→setValue change

Commit 454210a4 replaced renderFunction() with widget.value setter +
widget.callback() in endDrag, so the test assertion should verify
callback invocation instead of the removed renderSpy call.
This commit is contained in:
Will Miao
2026-05-07 11:03:38 +08:00
parent 7803bd542d
commit 6d5b4b7312

View File

@@ -114,7 +114,8 @@ describe('LoRA widget drag interactions', () => {
dragEl.dispatchEvent(new PointerEvent('pointerup', { pointerId: 1 })); dragEl.dispatchEvent(new PointerEvent('pointerup', { pointerId: 1 }));
expect(document.body.classList.contains('lm-lora-strength-dragging')).toBe(false); expect(document.body.classList.contains('lm-lora-strength-dragging')).toBe(false);
expect(onDragEnd).toHaveBeenCalledTimes(1); expect(onDragEnd).toHaveBeenCalledTimes(1);
expect(renderSpy).toHaveBeenCalledWith(widget.value, widget); // 454210a4 replaced renderFunction() with widget.value setter + widget.callback()
expect(widget.callback).toHaveBeenCalledWith(widget.value);
}); });
it('deletes the selected LoRA when backspace is pressed outside of strength inputs', async () => { it('deletes the selected LoRA when backspace is pressed outside of strength inputs', async () => {