diff --git a/api/src/misc/run-test.js b/api/src/misc/run-test.js index 2f8fb3c4..9ac4dbcb 100644 --- a/api/src/misc/run-test.js +++ b/api/src/misc/run-test.js @@ -13,9 +13,11 @@ export async function runTest(url, params, expect) { throw `invalid url: ${normalized.url}`; } - const result = await match( - parsed.host, parsed.patternMatch, normalized - ); + const result = await match({ + host: parsed.host, + patternMatch: parsed.patternMatch, + params: normalized, + }); let error = []; if (expect.status !== result.body.status) { diff --git a/api/src/util/test.js b/api/src/util/test.js index eb1474b4..34afde7e 100644 --- a/api/src/util/test.js +++ b/api/src/util/test.js @@ -43,7 +43,11 @@ for (let i in services) { throw `Invalid URL: ${chck.url}` } - let j = await match(parsed.host, parsed.patternMatch, chck); + let j = await match({ + host: parsed.host, + patternMatch: parsed.patternMatch, + params: chck, + }); console.log('\nReceived:'); console.log(j) if (j.status === test.expected.code && j.body.status === test.expected.status) {