UNPKG

@wordpress/e2e-test-utils

Version:
15 lines (14 loc) 571 B
import { join } from "path"; function parameterEquals(parameterName, value) { return (request) => new URL(request.url()).searchParams.get(parameterName) === value; } function isRESTRoute(path) { return (request) => parameterEquals("rest_route", path)(request) || new URL(request.url()).pathname.endsWith(join("/wp-json", path)); } function createEmbeddingMatcher(url) { return (request) => isRESTRoute("/oembed/1.0/proxy")(request) && parameterEquals("url", url)(request); } export { createEmbeddingMatcher }; //# sourceMappingURL=create-embedding-matcher.js.map