UNPKG

playwright-fluent

Version:
27 lines (26 loc) 827 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../../playwright-fluent")); describe('Playwright Fluent - delayRequestsTo(url)', () => { let p; beforeEach(() => { p = new SUT.PlaywrightFluent(); }); afterEach(async () => { await p.close(); }); test('should return an error when browser has not been launched', async () => { // Given // When let result = undefined; try { await p.delayRequestsTo('/foobar', 10); } catch (error) { result = error; } // Then expect(result && result.message).toContain("Cannot delay requests to '/foobar' because no browser has been launched"); }); });