/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/mui-system/src/borders/borders.test.js
56 строк
1 KB
Jose C Quintas Jr
[code-infra] Vitest test migration (#44325)
01 дек 2025, 18:46
Не верифицирован
01 дек 2025, 18:46
83d2589
Код
Авторство
О чём код?
import { expect } from 'chai'; import borders from './borders'; describe('borders', () => { it('should work', () => { const output = borders({ border: 1, borderRadius: 1, outline: 1, }); expect(output).to.deep.equal({ border: '1px solid', borderRadius: 4, outline: '1px solid', }); }); it('should work with 0', () => { const output = borders({ borderRadius: 0, }); expect(output).to.deep.equal({ borderRadius: 0, }); }); describe('theme shape as string', () => { it('should work', () => { const output = borders({ borderRadius: 2, theme: { shape: { borderRadius: '4px', }, }, }); expect(output).to.deep.equal({ borderRadius: 'calc(2 * 4px)', }); }); it('should work with 0', () => { const output = borders({ borderRadius: 0, theme: { shape: { borderRadius: '4px', }, }, }); expect(output).to.deep.equal({ borderRadius: 'calc(0 * 4px)', }); }); }); });