generated from Seekra/repository-template
Add CSS dimensions utility unit test #107
@@ -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);
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user