File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 11import { lower } from '../Lower'
22
3- describe ( 'Lower' , ( ) => {
4- it ( 'return uppercase strings' , ( ) => {
5- expect ( lower ( 'hello' ) ) . toBe ( 'hello' )
6- expect ( lower ( 'WORLD' ) ) . toBe ( 'world' )
7- expect ( lower ( 'hello_WORLD' ) ) . toBe ( 'hello_world' )
3+ describe ( 'Testing the Lower function' , ( ) => {
4+ it ( 'Test 1: Check by invalid type' , ( ) => {
5+ expect ( ( ) => lower ( 345 ) ) . toThrowError ( ) ;
6+ expect ( ( ) => lower ( true ) ) . toThrowError ( ) ;
7+ expect ( ( ) => lower ( null ) ) . toThrowError ( ) ;
8+ } )
9+
10+ it ( 'Test 2: Check by uppercase string' , ( ) => {
11+ expect ( lower ( 'WORLD' ) ) . toBe ( 'world' ) ;
12+ expect ( lower ( 'Hello_WORLD' ) ) . toBe ( 'hello_world' ) ;
13+ } )
14+
15+ it ( 'Test 3: Check by lowercase string' , ( ) => {
16+ expect ( lower ( 'hello' ) ) . toBe ( 'hello' ) ;
17+ expect ( lower ( 'hello_world' ) ) . toBe ( 'hello_world' ) ;
818 } )
919} )
You can’t perform that action at this time.
0 commit comments