import * as SUT from '../index' ; import { ElementHandle } from 'playwright' ; describe ( 'get attribute of handle' , ( ) : void => { beforeEach ( ( ) : void => { } ) ; test ( 'should return null when handle is undefined' , async ( ) : Promise < void > => { const handle = undefined ; const result = await SUT . getAttributeOfHandle ( 'foobar' , handle ) ; expect ( result ) . toBeNull ( ) ; } ) ; test ( 'should return null when handle is null' , async ( ) : Promise < void > => { const handle = null ; const result = await SUT . getAttributeOfHandle ( 'foobar' , handle ) ; expect ( result ) . toBeNull ( ) ; } ) ; } ) ;