mockServerClient.js
function (pathOrRequestMatcher, type) {
            if (type) {
                var typeEnum = ['EXPECTATIONS', 'LOG', 'ALL'];
                if (typeEnum.indexOf(type) === -1) {
                    throw new Error("\"" + (type || "undefined") + "\" is not a supported value for \"type\" parameter only " + typeEnum + " are allowed values");
                }
            }
            return makeRequest(host, port, "/clear" + (type ? "?type=" + type : ""), addDefaultRequestMatcherHeaders(pathOrRequestMatcher));
        }
function (pathOrRequestMatcher, type) {
            if (type) {
                var typeEnum = ['EXPECTATIONS', 'LOG', 'ALL'];
                if (typeEnum.indexOf(type) === -1) {
                    throw new Error("\"" + (type || "undefined") + "\" is not a supported value for \"type\" parameter only " + typeEnum + " are allowed values");
                }
            }
            return makeRequest(host, port, "/clear" + (type ? "?type=" + type : ""), addDefaultRequestMatcherHeaders(pathOrRequestMatcher));
        }
function ( pathOrRequestMatcher , type ) { if ( type ) { var typeEnum = [ 'EXPECTATIONS' , 'LOG' , 'ALL' ] ; if ( typeEnum . indexOf ( type ) === - 1 ) { throw new Error ( "\"" + ( type || "undefined" ) + "\" is not a supported value for \"type\" parameter only " + typeEnum + " are allowed values" ) ; } } return makeRequest ( host , port , "/clear" + ( type ? "?type=" + type : "" ) , addDefaultRequestMatcherHeaders ( pathOrRequestMatcher ) ) ; }
Clear all recorded requests, expectations and logs that match the specified path

@param pathOrRequestMatcher  if a string is passed in the value will be treated as the path to
decide what to clear, however if an object is passed
in the value will be treated as a full request matcher object
@param type                  the type to clear 'EXPECTATIONS', 'LOG' or 'ALL', defaults to 'ALL' if not specified
Clear all recorded requests expectations and logs that match the specified path