import * as SUT from '../index' ; import { defaultWaitUntilOptions } from '../../../../utils' ; import { Page } from 'playwright' ; describe ( 'has-selector-class' , ( ) : void => { beforeEach ( ( ) : void => { } ) ; test ( 'should return an error when page has not been initialized' , async ( ) : Promise < void > => { const page = undefined ; const expectedError = new Error ( "Cannot check that 'foobar' has class 'yo' because no browser has been launched" ) ; await SUT . hasSelectorClass ( 'foobar' , 'yo' , page , defaultWaitUntilOptions ) . catch ( ( error ) : void => expect ( error ) . toMatchObject ( expectedError ) ) ; } ) ; } ) ;