UNPKG

@wordpress/e2e-test-utils

Version:
16 lines (15 loc) 520 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createURLMatcher = createURLMatcher; /** * Creates a function to determine if a request is calling a URL with the substring present. * * @param {string} substring The substring to check for. * @return {Function} Function that determines if a request's URL contains substring. */ function createURLMatcher(substring) { return request => -1 !== request.url().indexOf(substring); } //# sourceMappingURL=create-url-matcher.js.map