-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-integration.ts
More file actions
29 lines (25 loc) · 865 Bytes
/
test-integration.ts
File metadata and controls
29 lines (25 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { NameEnhanced } from "./client/src/lib/NameEnhanced";
console.log("=== Integration Test: Normalization Library ===\n");
const testCases = [
"John Doe (he/him) (Ph.D.)",
"Albert L Gaffney III",
"Chaitanya Saha CSCP, CPIM, CTSC",
"Dr. Jane Smith MBA, CPA",
"Bob Jones Jr. PE",
"Maria Garcia RN, BSN, MSN",
"David Lee AWS, CISSP, CCNA",
];
testCases.forEach((input, i) => {
const name = new NameEnhanced(input);
console.log(`Test ${i + 1}: "${input}"`);
console.log(` Valid: ${name.isValid}`);
if (name.isValid) {
console.log(` First: ${name.firstName}`);
console.log(` Middle: ${name.middleName || "(none)"}`);
console.log(` Last: ${name.lastName}`);
console.log(` Suffix: ${name.suffix || "(none)"}`);
console.log(` Full: ${name.full}`);
}
console.log("");
});
console.log("✅ All tests completed!");