playwright-fluent
Version:
Fluent API around playwright
41 lines (40 loc) • 1.38 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const SUT = tslib_1.__importStar(require("../index"));
describe('handle has text', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
beforeEach(() => { });
test('should return false when handle is undefined', async () => {
// Given
const handle = undefined;
// When
const result = await SUT.hasHandleText(handle, 'foobar');
// Then
expect(result).toBe(false);
});
test('should return false when handle is null', async () => {
// Given
const handle = null;
// When
const result = await SUT.hasHandleText(handle, 'foobar');
// Then
expect(result).toBe(false);
});
test('should return false when handle is null and expected value is empty', async () => {
// Given
const handle = null;
// When
const result = await SUT.hasHandleText(handle, '');
// Then
expect(result).toBe(false);
});
test('should return false when handle is undefined and expected value is empty', async () => {
// Given
const handle = undefined;
// When
const result = await SUT.hasHandleText(handle, '');
// Then
expect(result).toBe(false);
});
});
;