Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
sommilito-bank2
/
splide-4.1.3
/
src
/
js
/
utils
/
dom
/
unit
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import { unit } from './unit'; describe( 'unit', () => { test( 'can append `px` if the value is number.', () => { expect( unit( 1 ) ).toBe( '1px' ); expect( unit( 1.8 ) ).toBe( '1.8px' ); } ); test( 'should return the value itself if it is string.', () => { expect( unit( '10vh' ) ).toBe( '10vh' ); expect( unit( '10em' ) ).toBe( '10em' ); } ); } );