Lines Matching refs:path
94 function safeUrl (path) {
95 if (typeof path !== 'string') {
96 return path
99 const pathSegments = path.split('?')
102 return path
110 function matchKey (mockDispatch, { path, method, body, headers }) {
111 const pathMatch = matchValue(mockDispatch.path, path)
129 const basePath = key.query ? buildURL(key.path, key.query) : key.path
132 // Match path
133 let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))
135 throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)
180 const { path, method, body, headers, query } = opts
182 path,