UNPKG

playwright-fluent

Version:
19 lines (18 loc) 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../index")); describe('record page dialogs', () => { // eslint-disable-next-line @typescript-eslint/no-empty-function beforeEach(() => { }); test('should return an error when browser has not been launched', async () => { // Given const page = undefined; // eslint-disable-next-line @typescript-eslint/no-empty-function const callback = () => { }; // When // Then const expectedError = new Error('Cannot record page dialogs because no browser has been launched'); await SUT.recordPageDialogs(page, callback).catch((error) => expect(error).toMatchObject(expectedError)); }); });