/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/scene/container/__tests__/renderable.test.ts
50 строк
1 KB
Matt Karl
chore: Reorganize tests into more conventional structure (#11126)
04 дек 2024, 23:36
Не верифицирован
04 дек 2024, 23:36
a68e311
Код
Авторство
О чём код?
import { Container } from '../Container'; import { DummyView } from './DummyView'; describe('Renderable Containers', () => { it('should register a renderable update correctly in the render group', async () => { const container = new Container({ isRenderGroup: true, }); const child = new DummyView(); container.addChild(child); child.onViewUpdate(); expect(container.renderGroup.childrenRenderablesToUpdate).toEqual({ list: [child], index: 1, }); }); it('should register a renderable update only once on the render group', async () => { const container = new Container({ isRenderGroup: true, }); const child = new DummyView(); container.addChild(child); // updateLayerGroupTransforms(container.layerGroup); child.onViewUpdate(); expect(container.renderGroup.childrenRenderablesToUpdate).toEqual({ list: [child], index: 1, }); child.onViewUpdate(); expect(container.renderGroup.childrenRenderablesToUpdate).toEqual({ list: [child], index: 1, }); }); });