feat(saju-lab): reference fixture 30 케이스 (TS 엔진 결과 추출)
This commit is contained in:
58
saju-lab/tests/fixtures/generate_reference.ts
vendored
Normal file
58
saju-lab/tests/fixtures/generate_reference.ts
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
// saju-lab/tests/fixtures/generate_reference.ts
|
||||
// Usage (run from saju-web/ so solarlunar resolves):
|
||||
// cd C:/Users/jaeoh/Desktop/workspace/saju-web
|
||||
// npx -y tsx ../web-backend/saju-lab/tests/fixtures/generate_reference.ts > ../web-backend/saju-lab/tests/fixtures/reference_saju.json
|
||||
import { calculateSaju } from '../../../../saju-web/lib/saju-calculator';
|
||||
import { performFullAnalysis } from '../../../../saju-web/lib/ai-interpretation';
|
||||
import { calculateDaeun } from '../../../../saju-web/lib/daeun-calculator';
|
||||
|
||||
const CASES = [
|
||||
{ year: 1990, month: 5, day: 15, hour: 14, gender: 'male' as const },
|
||||
{ year: 1985, month: 1, day: 1, hour: 0, gender: 'female' as const },
|
||||
{ year: 2000, month: 2, day: 29, hour: 12, gender: 'male' as const },
|
||||
{ year: 1995, month: 2, day: 3, hour: 23, gender: 'female' as const },
|
||||
{ year: 1995, month: 2, day: 4, hour: 13, gender: 'male' as const },
|
||||
{ year: 1995, month: 2, day: 5, hour: 5, gender: 'female' as const },
|
||||
{ year: 1980, month: 6, day: 6, hour: 6, gender: 'male' as const },
|
||||
{ year: 1975, month: 11, day: 11, hour: 11, gender: 'female' as const },
|
||||
{ year: 2010, month: 12, day: 31, hour: 23, gender: 'male' as const },
|
||||
{ year: 1960, month: 4, day: 8, hour: 16, gender: 'female' as const },
|
||||
{ year: 1972, month: 7, day: 24, hour: 9, gender: 'male' as const },
|
||||
{ year: 1968, month: 10, day: 15, hour: 21, gender: 'female' as const },
|
||||
{ year: 1955, month: 3, day: 3, hour: 7, gender: 'male' as const },
|
||||
{ year: 1992, month: 8, day: 8, hour: 18, gender: 'female' as const },
|
||||
{ year: 1988, month: 9, day: 9, hour: 4, gender: 'male' as const },
|
||||
{ year: 1999, month: 12, day: 22, hour: 22, gender: 'female' as const },
|
||||
{ year: 2005, month: 6, day: 22, hour: 14, gender: 'male' as const },
|
||||
{ year: 2015, month: 3, day: 21, hour: 12, gender: 'female' as const },
|
||||
{ year: 2020, month: 9, day: 23, hour: 12, gender: 'male' as const },
|
||||
{ year: 1945, month: 8, day: 15, hour: 12, gender: 'male' as const },
|
||||
{ year: 1950, month: 6, day: 25, hour: 4, gender: 'male' as const },
|
||||
{ year: 1977, month: 7, day: 7, hour: 7, gender: 'female' as const },
|
||||
{ year: 1983, month: 11, day: 23, hour: 13, gender: 'male' as const },
|
||||
{ year: 1991, month: 4, day: 14, hour: 19, gender: 'female' as const },
|
||||
{ year: 1996, month: 5, day: 5, hour: 5, gender: 'male' as const },
|
||||
{ year: 2003, month: 10, day: 10, hour: 10, gender: 'female' as const },
|
||||
{ year: 2008, month: 8, day: 8, hour: 8, gender: 'male' as const },
|
||||
{ year: 2012, month: 12, day: 12, hour: 12, gender: 'female' as const },
|
||||
{ year: 1965, month: 1, day: 20, hour: 23, gender: 'male' as const },
|
||||
{ year: 1973, month: 7, day: 4, hour: 17, gender: 'female' as const },
|
||||
];
|
||||
|
||||
const CURRENT_YEAR = 2026;
|
||||
|
||||
const out = CASES.map((input) => {
|
||||
const saju = calculateSaju(input.year, input.month, input.day, input.hour, input.gender);
|
||||
const analysis = performFullAnalysis(saju, CURRENT_YEAR);
|
||||
const daeun = calculateDaeun(
|
||||
input.year,
|
||||
input.month,
|
||||
input.day,
|
||||
input.gender,
|
||||
saju.month.stem,
|
||||
saju.month.branch,
|
||||
);
|
||||
return { input, expected: { saju, analysis, daeun } };
|
||||
});
|
||||
|
||||
console.log(JSON.stringify(out, null, 2));
|
||||
11073
saju-lab/tests/fixtures/reference_saju.json
vendored
Normal file
11073
saju-lab/tests/fixtures/reference_saju.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user