UNPKG

playwright-fluent

Version:
15 lines (14 loc) 613 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../index")); describe('type text', () => { test('should return an error when browser has not been launched', async () => { // Given const page = undefined; // When // Then const expectedError = new Error("Cannot type text 'foobar' because no browser has been launched"); await SUT.typeText('foobar', page, SUT.defaultTypeTextOptions).catch((error) => expect(error).toMatchObject(expectedError)); }); });