Set up Vitest (jsdom environment) and @testing-library/react. api.test.ts — fetchRunningApps: - returns parsed JSON on 2xx - returns [] on non-ok HTTP status - returns [] on network error (non-throwing contract) KnobCard.test.tsx — app_volume: - datalist is rendered with all supplied runningApps as options - no datalist / list attr when runningApps is empty or omitted - onChange called with the new value on input change KnobCard.test.tsx — group_volume: - app-picker select rendered with runningApps options - no picker when runningApps is empty or omitted - Add button disabled until an app is selected - Add button enabled after selection - clicking Add appends app to targets - clicking Add skips duplicates (onChange not called) - picker resets to placeholder after a successful Add
29 lines
750 B
JSON
29 lines
750 B
JSON
{
|
|
"compilerOptions": {
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
"target": "ES2022",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"module": "ESNext",
|
|
"types": ["vite/client", "vitest/globals"],
|
|
"skipLibCheck": true,
|
|
|
|
/* Bundler mode */
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"verbatimModuleSyntax": true,
|
|
"moduleDetection": "force",
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
|
|
/* Linting */
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"erasableSyntaxOnly": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noUncheckedSideEffectImports": true
|
|
},
|
|
"include": ["src"]
|
|
}
|