UNPKG

playwright-fluent

Version:
17 lines (16 loc) 721 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../index")); describe('get client rectangle', () => { // eslint-disable-next-line @typescript-eslint/no-empty-function beforeEach(() => { }); test('should return an error when page has not been initalized', async () => { // Given const page = undefined; // When // Then const expectedError = new Error("Cannot get the client rectangle of 'foobar' because no browser has been launched"); await SUT.getClientRectangleOf('foobar', page).catch((error) => expect(error).toMatchObject(expectedError)); }); });