UNPKG

@splidejs/splide

Version:

Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.

15 lines (11 loc) 351 B
import { pad } from './pad'; describe( 'pad', () => { test( 'can pad a number with 0.', () => { expect( pad( 1 ) ).toBe( '01' ); expect( pad( 5 ) ).toBe( '05' ); } ); test( 'should not pad if the number is greater than 9.', () => { expect( pad( 10 ) ).toBe( '10' ); expect( pad( 11 ) ).toBe( '11' ); } ); } );