generated from Seekra/repository-template
test(style): add describe to cssDimensions test
This commit is contained in:
@@ -14,10 +14,11 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect, test } from 'vitest';
|
import { describe, expect, test } from 'vitest';
|
||||||
import { ensureUnit } from '../cssDimensions';
|
import { ensureUnit } from '../cssDimensions';
|
||||||
|
|
||||||
test.for([
|
describe('cssDimensions', () => {
|
||||||
|
test.for([
|
||||||
{ dimension: null, expected: '0px' },
|
{ dimension: null, expected: '0px' },
|
||||||
{ dimension: undefined, expected: '0px' },
|
{ dimension: undefined, expected: '0px' },
|
||||||
|
|
||||||
@@ -117,6 +118,7 @@ test.for([
|
|||||||
{ dimension: 'max(42px,5rem)', expected: 'max(42px,5rem)' },
|
{ dimension: 'max(42px,5rem)', expected: 'max(42px,5rem)' },
|
||||||
{ dimension: 'clamp(42vh,23vw,13cap)', expected: 'clamp(42vh,23vw,13cap)' },
|
{ dimension: 'clamp(42vh,23vw,13cap)', expected: 'clamp(42vh,23vw,13cap)' },
|
||||||
{ dimension: 'clamp( 42vh,23vw,13cap )', expected: 'clamp( 42vh,23vw,13cap )' }
|
{ dimension: 'clamp( 42vh,23vw,13cap )', expected: 'clamp( 42vh,23vw,13cap )' }
|
||||||
])('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