UNPKG

playwright-fluent

Version:
31 lines (30 loc) 972 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const SUT = tslib_1.__importStar(require("../index")); describe('hasQueryString(url)', () => { test('should detect query string', async () => { // Given const url = 'http://localhost:8080/foobar?foo=bar'; // When const result = SUT.hasQueryString(url); // Then expect(result).toBe(true); }); test('should not detect query string', async () => { // Given const url = 'http://localhost:8080/foobar/#'; // When const result = SUT.hasQueryString(url); // Then expect(result).toBe(false); }); test('should not detect empty query string', async () => { // Given const url = 'http://localhost:8080/foobar?'; // When const result = SUT.hasQueryString(url); // Then expect(result).toBe(false); }); });