diff --git a/src/test/test.js b/src/test/test.js index b3bcff04..f26f3b95 100644 --- a/src/test/test.js +++ b/src/test/test.js @@ -5,7 +5,7 @@ import { services } from "../modules/config.js"; import { extract } from "../modules/processing/url.js"; import match from "../modules/processing/match.js"; import { loadJSON } from "../modules/sub/loadFromFs.js"; -import { checkJSONPost } from "../modules/sub/utils.js"; +import { normalizeRequest } from "../modules/processing/request.js"; import { env } from "../modules/config.js"; env.apiURL = 'http://localhost:9000' @@ -35,9 +35,8 @@ for (let i in services) { let params = {...{url: test.url}, ...test.params}; console.log(params); - let chck = checkJSONPost(params); + let chck = normalizeRequest(params); if (chck) { - chck["ip"] = "d21ec524bc2ade41bef569c0361ac57728c69e2764b5cb3cb310fe36568ca53f"; // random sha256 const parsed = extract(chck.url); if (parsed === null) { throw `Invalid URL: ${chck.url}`