/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/rendering/renderers/shared/background/__tests__/BackgroundSystem.test.ts
23 строки
667 B
Matt Karl
chore: Reorganize tests into more conventional structure (#11126)
04 дек 2024, 23:36
Не верифицирован
04 дек 2024, 23:36
a68e311
Код
Авторство
О чём код?
import { BackgroundSystem } from '../BackgroundSystem'; describe('BackgroundSystem', () => { it('should set alpha correctly from backgroundAlpha', async () => { const backgroundSystem = new BackgroundSystem(); backgroundSystem.init({ backgroundColor: 'red', backgroundAlpha: 0.5, clearBeforeRender: true }); expect(backgroundSystem.alpha).toEqual(0.5); expect(backgroundSystem.colorRgba).toEqual([1, 0, 0, 0.5]); backgroundSystem.alpha = 1; expect(backgroundSystem.alpha).toEqual(1); expect(backgroundSystem.colorRgba).toEqual([1, 0, 0, 1]); }); });