/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/coercion/css-pixel-value.spec.ts
19 строк
558 B
Kristiyan Kostadinov
feat(coercion): add utility for coercing CSS values (#10654)
05 апр 2018, 18:00
05 апр 2018, 18:00
e30824c
Код
Авторство
О чём код?
import {coerceCssPixelValue} from './css-pixel-value'; describe('coerceCssPixelValue', () => { it('should add pixel units to a number value', () => { expect(coerceCssPixelValue(1337)).toBe('1337px'); }); it('should ignore string values', () => { expect(coerceCssPixelValue('1337rem')).toBe('1337rem'); }); it('should return an empty string for null', () => { expect(coerceCssPixelValue(null)).toBe(''); }); it('should return an empty string for undefined', () => { expect(coerceCssPixelValue(undefined)).toBe(''); }); });