@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
16 lines (15 loc) • 520 B
JavaScript
;
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