feat: replace polling with Tauri events and add unit tests

- Backend now emits playback:state events every 250ms when state changes
- PlayerStore uses listen() instead of setInterval for real-time updates
- Added Vitest testing framework with mocked Tauri APIs
- Added 53 unit tests for playerStore and queueStore
This commit is contained in:
vicrodh committed 2026-01-10 06:14:59 -06:00
1 parent 6dfcc8adaa
commit 71156e9d0a
8 files changed
+1872 -48

No files matched your search

+6 -1
View File
@@ -9,6 +9,8 @@
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test": "vitest",
"test:run": "vitest run",
"tauri": "tauri"
},
"license": "MIT",
@@ -25,9 +27,12 @@
"@sveltejs/kit": "^2.9.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tauri-apps/cli": "^2",
"@testing-library/svelte": "^5.3.1",
"jsdom": "^27.4.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "~5.6.2",
"vite": "^6.0.3"
"vite": "^6.0.3",
"vitest": "^4.0.16"
}
}