Download wp-calypso/packages/composite-checkout/test/join-classes.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/test/join-classes.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/composite-checkout/test/join-classes.ts
-
curl -L -o join-classes.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/test/join-classes.ts
633 Bytes
| import joinClasses from '../src/lib/join-classes'; | |
| describe( 'joinClasses', function () { | |
| it( 'returns an empty string when passed an empty array', function () { | |
| expect( joinClasses( [] ) ).toBe( '' ); | |
| } ); | |
| it( 'returns a single class when passed a singleton array', function () { | |
| expect( joinClasses( [ 'foo' ] ) ).toBe( 'foo' ); | |
| } ); | |
| it( 'returns two space-delimited classes when passed a doubleton array', function () { | |
| expect( joinClasses( [ 'foo', 'bar' ] ) ).toBe( 'foo bar' ); | |
| } ); | |
| it( 'converts numeric arguments to strings', function () { | |
| expect( joinClasses( [ 27, 0.1 ] ) ).toBe( '27 0.1' ); | |
| } ); | |
| } ); | |