28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import {
|
|
buildCustomerTonePromptSection,
|
|
customerToneGuidelines,
|
|
} from "../lib/ai/customer-tone-guidelines";
|
|
|
|
test("customer tone guidelines capture the selected collegial direct email posture", () => {
|
|
assert.equal(customerToneGuidelines.senderPosture, "kollegial_direkt");
|
|
assert.equal(customerToneGuidelines.email.wordCount.min, 60);
|
|
assert.equal(customerToneGuidelines.email.wordCount.max, 130);
|
|
assert.equal(customerToneGuidelines.email.subject.maxCharacters, 55);
|
|
assert.equal(
|
|
customerToneGuidelines.email.bannedPhrases.includes("Optimierungspotenziale"),
|
|
true,
|
|
);
|
|
});
|
|
|
|
test("customer tone prompt section gives concrete first-contact email rules", () => {
|
|
const promptSection = buildCustomerTonePromptSection();
|
|
|
|
assert.match(promptSection, /kollegial direkt/);
|
|
assert.match(promptSection, /maximal zwei verifizierte Befunde/);
|
|
assert.match(promptSection, /kein Mini-Audit/);
|
|
assert.match(promptSection, /Soll ich Ihnen die zwei Punkte kurz schicken/);
|
|
});
|