import assert from 'node:assert/strict'; import test from 'node:test'; import { writeTokenPathTransform } from './tokenPathLiveDom'; void test('writeTokenPathTransform: GPU-friendly translate3d, not left/top', () => { const el = { style: { transform: '' } } as unknown as HTMLElement; writeTokenPathTransform(el, 0.25, 0.5, 45, { x: 10, y: 20, w: 200, h: 100 }, true); assert.equal(el.style.transform, 'translate3d(60px, 70px, 0) translate(-50%, -50%) rotate(45deg)'); }); void test('writeTokenPathTransform: NPC without rotate keeps centering only', () => { const el = { style: { transform: '' } } as unknown as HTMLElement; writeTokenPathTransform(el, 0, 0, 90, { x: 0, y: 0, w: 100, h: 100 }, false); assert.equal(el.style.transform, 'translate3d(0px, 0px, 0) translate(-50%, -50%)'); });