Skip to content

Commit 3d2adf2

Browse files
author
Raj Vishwakarma
committed
task-autosync: Implement task auto sync for dev environemnt
1 parent 68c212f commit 3d2adf2

File tree

12 files changed

+682
-35
lines changed

12 files changed

+682
-35
lines changed

frontend/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
VITE_BACKEND_URL="http://localhost:8000/" # Backend URL for app or web frontend interaction
2+
VITE_FRONTEND_URL="http://localhost:80" # Web frontend URL to avoid CORS errors
3+
VITE_CONTAINER_ORIGIN="http://localhost:8080/" # URL of the deployed taskchampion-sync-server container
4+
VITE_SYNC_INTERVAL_MS="300000" #Auto-sync interval in milliseconds (e.g., 300000 = 5 minutes)

frontend/jest.config.cjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ module.exports = {
2121
{
2222
path: 'node_modules/ts-jest-mock-import-meta',
2323
options: {
24-
metaObjectReplacement: { url: 'https://www.url.com' },
24+
metaObjectReplacement: {
25+
url: 'https://www.url.com',
26+
env: {
27+
// Add all the .env variables your tests need
28+
VITE_SYNC_INTERVAL_MS: '300000',
29+
// e.g., VITE_API_URL: 'http://test.api.com'
30+
},
31+
},
2532
},
2633
},
2734
],

0 commit comments

Comments
 (0)