Add evaluation operations and reporting
This commit is contained in:
1 parent
60f33b8f4b
commit
6f09408423
57 files changed
+7060
-142
No files matched your search
@@ -8,7 +8,6 @@ import {
|
||||
isStep1Completed,
|
||||
} from "@skills/onboarding/state/progress";
|
||||
import type {
|
||||
OnboardingSession,
|
||||
StoredOnboardingSession,
|
||||
} from "@skills/onboarding/types";
|
||||
import type { Tool } from "../tool.js";
|
||||
|
||||
@@ -3,6 +3,7 @@ import { describe, expect, it, vi } from "vitest";
|
||||
import { verifyDiscordNicknameTool } from "./verify-discord-nickname.js";
|
||||
import type { OnboardingSession } from "@skills/onboarding/types";
|
||||
import type { DiscordMemberLookupResponse } from "@common/nats-subjects";
|
||||
import { KAKAOTALK_NICKNAME_FORMAT_EXAMPLE } from "@skills/onboarding/constants";
|
||||
|
||||
function makeSession(
|
||||
overrides?: Partial<OnboardingSession>,
|
||||
@@ -35,7 +36,7 @@ describe("verifyDiscordNicknameTool", () => {
|
||||
);
|
||||
|
||||
expect(result.status).toBe("invalid-nickname-format");
|
||||
expect(result.formatExample).toBe("홍길동/95/남/G");
|
||||
expect(result.formatExample).toBe(KAKAOTALK_NICKNAME_FORMAT_EXAMPLE);
|
||||
expect(result.issueMessages?.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
@@ -56,11 +57,11 @@ describe("verifyDiscordNicknameTool", () => {
|
||||
joinedAfterMatches: [],
|
||||
};
|
||||
const request = vi.fn(
|
||||
async <TRequest = unknown, TResponse = unknown>(
|
||||
<TRequest = unknown, TResponse = unknown>(
|
||||
_subject: string,
|
||||
_payload: TRequest,
|
||||
_options?: { timeoutMs?: number },
|
||||
): Promise<TResponse> => response as TResponse,
|
||||
): Promise<TResponse> => Promise.resolve(response as TResponse),
|
||||
);
|
||||
const session = makeSession();
|
||||
const result = await verifyDiscordNicknameTool.execute(
|
||||
@@ -102,11 +103,11 @@ describe("verifyDiscordNicknameTool", () => {
|
||||
joinedAfterMatches: [],
|
||||
};
|
||||
const request = vi.fn(
|
||||
async <TRequest = unknown, TResponse = unknown>(
|
||||
<TRequest = unknown, TResponse = unknown>(
|
||||
_subject: string,
|
||||
_payload: TRequest,
|
||||
_options?: { timeoutMs?: number },
|
||||
): Promise<TResponse> => response as TResponse,
|
||||
): Promise<TResponse> => Promise.resolve(response as TResponse),
|
||||
);
|
||||
|
||||
const result = await verifyDiscordNicknameTool.execute(
|
||||
@@ -141,11 +142,11 @@ describe("verifyDiscordNicknameTool", () => {
|
||||
],
|
||||
};
|
||||
const request = vi.fn(
|
||||
async <TRequest = unknown, TResponse = unknown>(
|
||||
<TRequest = unknown, TResponse = unknown>(
|
||||
_subject: string,
|
||||
_payload: TRequest,
|
||||
_options?: { timeoutMs?: number },
|
||||
): Promise<TResponse> => response as TResponse,
|
||||
): Promise<TResponse> => Promise.resolve(response as TResponse),
|
||||
);
|
||||
|
||||
const result = await verifyDiscordNicknameTool.execute(
|
||||
|
||||
Reference in new issue
Block a user