test: update imports

This commit is contained in:
dumbmoron 2024-05-15 17:04:53 +00:00
parent b13919d89b
commit 1a77a46396
No known key found for this signature in database

View file

@ -5,7 +5,7 @@ import { services } from "../modules/config.js";
import { extract } from "../modules/processing/url.js"; import { extract } from "../modules/processing/url.js";
import match from "../modules/processing/match.js"; import match from "../modules/processing/match.js";
import { loadJSON } from "../modules/sub/loadFromFs.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"; import { env } from "../modules/config.js";
env.apiURL = 'http://localhost:9000' env.apiURL = 'http://localhost:9000'
@ -35,9 +35,8 @@ for (let i in services) {
let params = {...{url: test.url}, ...test.params}; let params = {...{url: test.url}, ...test.params};
console.log(params); console.log(params);
let chck = checkJSONPost(params); let chck = normalizeRequest(params);
if (chck) { if (chck) {
chck["ip"] = "d21ec524bc2ade41bef569c0361ac57728c69e2764b5cb3cb310fe36568ca53f"; // random sha256
const parsed = extract(chck.url); const parsed = extract(chck.url);
if (parsed === null) { if (parsed === null) {
throw `Invalid URL: ${chck.url}` throw `Invalid URL: ${chck.url}`