playwright-fluent
Version:
Fluent API around playwright
20 lines (19 loc) • 757 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const playwright_fluent_1 = require("../../playwright-fluent");
describe('Playwright Fluent - cast', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
beforeEach(() => { });
test('should cast', async () => {
// Given
const p = new playwright_fluent_1.PlaywrightFluent();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ctx = {};
ctx.p = p;
// When
const castedInstance = (0, playwright_fluent_1.cast)(ctx.p);
// Then
expect(castedInstance instanceof playwright_fluent_1.PlaywrightFluent).toBe(true);
expect(castedInstance).toBe(p);
});
});
;