mirror of
https://github.com/getmaxun/maxun.git
synced 2026-10-16 20:21:03 +08:00
52639c4c1e
server had no test infra at all (no test script, no jest config). Add jest/ts-jest scoped to server/, and directly unit test computeCrawlSearchPersistDelta/mergeCrawlDelta/mergeSearchDelta - the new delta-slicing and append-merge logic - without needing to mock the database or drive a full interpreter run. Verified these tests actually catch the regression they're meant to: temporarily reverted the slicing to send full arrays again and confirmed 4 of the 11 tests fail, including the end-to-end one showing the exact page duplication the fix prevents.
16 lines
358 B
JSON
16 lines
358 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2020",
|
|
"module": "commonjs",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"moduleResolution": "node",
|
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
"allowJs": true,
|
|
"types": ["node", "jest"]
|
|
},
|
|
"include": ["src/**/*"]
|
|
}
|