28 lines
908 B
TypeScript
28 lines
908 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { normalizeProviderValidation } from "../src/stores/provider-profiles-view.ts";
|
|
|
|
test("Provider validation exposes real test model and final response", () => {
|
|
const validation = normalizeProviderValidation({
|
|
data: {
|
|
validationId: "val_profile_test",
|
|
profile: "gpt.pika",
|
|
model: "gpt-5.4-mini",
|
|
status: "completed",
|
|
runId: "run_profile_test",
|
|
commandId: "cmd_profile_test",
|
|
result: {
|
|
finalResponse: { text: "HWLAB provider profile test OK" },
|
|
elapsedMs: 1234,
|
|
terminalStatus: "completed"
|
|
},
|
|
valuesPrinted: false
|
|
}
|
|
});
|
|
assert.equal(validation.profile, "gpt.pika");
|
|
assert.equal(validation.model, "gpt-5.4-mini");
|
|
assert.equal(validation.outputText, "HWLAB provider profile test OK");
|
|
assert.equal(validation.elapsedMs, "1234");
|
|
});
|