implement phase 4

This commit is contained in:
Suphonchai Phoonsawat 2026-08-19 21:35:07 +07:00
parent 25c2ce53cd
commit f4b1c3e14b
27 changed files with 6929 additions and 48 deletions

13
addin/jest.config.js Normal file
View file

@ -0,0 +1,13 @@
/* eslint-disable no-undef */
/**
* Unit tests ของ services layer — แปลง TS ด้วย babel-jest (ใช้ babel.config.json เดิม
* ที่มี @babel/preset-typescript อยู่แล้ว — type-check ทำที่ npm run build ผ่าน ts-loader)
* environment = jsdom เพราะ services ใช้ DOM API (DOMParser, Blob, btoa, URLSearchParams)
*/
module.exports = {
testEnvironment: "jsdom",
roots: ["<rootDir>/src"],
setupFiles: ["<rootDir>/src/test/setup.ts"],
testMatch: ["**/*.test.ts"],
};