Add CSS dimensions utility unit test #107

Merged
jakob.scheid merged 8 commits from testing/css-dimensions-util into main 2026-06-04 12:41:14 +02:00
Showing only changes of commit a365322a5b - Show all commits
@@ -18,6 +18,8 @@ import { expect, test } from 'vitest';
import { ensureUnit } from '../cssDimensions'; import { ensureUnit } from '../cssDimensions';
test.for([ test.for([
{ dimension: null, expected: '0px' },
{ dimension: undefined, expected: '0px' }
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => { ])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
expect(ensureUnit(dimension)).toBe(expected); expect(ensureUnit(dimension)).toBe(expected);
}); });