import * as SUT from '../index' ; import { ElementHandle } from 'playwright' ; describe ( 'get class list of handle' , ( ) : void => { beforeEach ( ( ) : void => { } ) ; test ( 'should return an empty array when handle is undefined' , async ( ) : Promise < void > => { const handle = undefined ; const result = await SUT . getClassListOfHandle ( handle ) ; expect ( Array . isArray ( result ) ) . toBe ( true ) ; expect ( result . length ) . toBe ( 0 ) ; } ) ; test ( 'should return an empty array when handle is null' , async ( ) : Promise < void > => { const handle = null ; const result = await SUT . getClassListOfHandle ( handle ) ; expect ( Array . isArray ( result ) ) . toBe ( true ) ; expect ( result . length ) . toBe ( 0 ) ; } ) ; } ) ;