21 lines
1.0 KiB
TypeScript
21 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { getHandler } from "../../src/engine/registry";
|
|
import type { CatalogComponent, FlowNode } from "../../src/types";
|
|
import type { RunContext } from "../../src/engine/types";
|
|
import "../../src/capabilities/remaining-core";
|
|
|
|
const ctx = { signal: new AbortController().signal, log: () => {}, vars: {}, evidenceDir: "D:/office-test2/ocr-test" } as unknown as RunContext;
|
|
const node: FlowNode = { id: "smoke", componentId: "smoke", position: { x: 0, y: 0 }, values: {}, options: {} };
|
|
|
|
describe("算术验证码现状侦察", () => {
|
|
const files = ["captcha_0_3p5_q", "captcha_1_12m7_q", "captcha_2_6t4_q", "captcha_3_15p28_q", "captcha_4_9t9_q"];
|
|
it("当前 OCR 原始输出", async () => {
|
|
for (const f of files) {
|
|
const handler = getHandler("OCR_CalculationCode");
|
|
const out = await handler!(ctx, node, { path: `D:/office-test2/ocr-test/${f}.png` }, {} as CatalogComponent);
|
|
console.log(`[${f}]`, JSON.stringify(out));
|
|
}
|
|
expect(true).toBe(true);
|
|
}, 600000);
|
|
});
|