mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
test: update match() arguments to new format
This commit is contained in:
parent
8cee4e58c5
commit
4b4fce326f
2 changed files with 10 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue