-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
22 lines (18 loc) · 918 Bytes
/
test.js
File metadata and controls
22 lines (18 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import assert from "node:assert/strict";
import { analyzeProfileRedFlags } from "./src/index.js";
const harsh = analyzeProfileRedFlags(
"No drama. If you can't handle sarcasm, keep scrolling. Don't message me unless you can keep up."
);
assert.equal(harsh.summary.verdict, "likely mismatch");
assert.ok(harsh.signals.cynicism >= 6);
assert.ok(harsh.signals.pressure >= 5.5);
const grounded = analyzeProfileRedFlags(
"Bookstore dates, Sunday walks, and honest conversation. I like kind people who say what they mean."
);
assert.equal(grounded.summary.verdict, "looks fine");
assert.ok(grounded.greenSignals.specificity >= 5.5);
assert.ok(grounded.greenSignals.warmth >= 5.5);
const vague = analyzeProfileRedFlags("Just ask. Good vibes only. Here for a good time.");
assert.ok(vague.signals.vagueness >= 5.5);
assert.equal(vague.summary.verdict, "read carefully");
console.log("profile-red-flags tests passed");