/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/assets/utils/__tests__/createStringVariations.test.ts
35 строк
911 B
Matt Karl
chore: Reorganize tests into more conventional structure (#11126)
04 дек 2024, 23:36
Не верифицирован
04 дек 2024, 23:36
a68e311
Код
Авторство
О чём код?
import { createStringVariations } from '../createStringVariations'; describe('createStringVariations', () => { it('createStringVariations should parse correctly', () => { const out = createStringVariations('hell@{2,1,0.5}x.{png,webp,avif}'); expect(out).toEqual([ 'hell@2x.png', 'hell@2x.webp', 'hell@2x.avif', 'hell@1x.png', 'hell@1x.webp', 'hell@1x.avif', 'hell@0.5x.png', 'hell@0.5x.webp', 'hell@0.5x.avif', ]); const out2 = createStringVariations('name is {chicken,wolf,sheep}'); expect(out2).toEqual([ 'name is chicken', 'name is wolf', 'name is sheep', ]); const out3 = createStringVariations('hell@2x.png'); expect(out3).toEqual([ 'hell@2x.png', ]); }); });