diff --git a/frontend/package.json b/frontend/package.json index 33f3f5b..e114fd7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,7 @@ "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", - "test:links": "node test-links.js" + "test:links": "node tests/test-links.js" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/frontend/LINK_TESTING.md b/frontend/tests/README.md similarity index 97% rename from frontend/LINK_TESTING.md rename to frontend/tests/README.md index b774c73..10a0edb 100644 --- a/frontend/LINK_TESTING.md +++ b/frontend/tests/README.md @@ -5,6 +5,7 @@ This directory contains a comprehensive test suite for validating all markdown l ## Running the Tests ```bash +# From project root npm run test:links ``` @@ -92,4 +93,4 @@ Key paths are configured at the top of `test-links.js`: ## Exit Codes - **0**: All links valid -- **1**: One or more invalid links found \ No newline at end of file +- **1**: One or more invalid links found diff --git a/frontend/test-links.js b/frontend/tests/test-links.js similarity index 97% rename from frontend/test-links.js rename to frontend/tests/test-links.js index 9e3f946..da5d708 100755 --- a/frontend/test-links.js +++ b/frontend/tests/test-links.js @@ -8,9 +8,9 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // Configuration -const POSTS_DIR = join(__dirname, 'src', 'posts'); -const DATA_IMAGES_DIR = join(__dirname, '..', 'data', 'images'); -const STATIC_DIR = join(__dirname, 'static'); +const POSTS_DIR = join(__dirname, '..', 'src', 'posts'); +const DATA_IMAGES_DIR = join(__dirname, '..', '..', 'data', 'images'); +const STATIC_DIR = join(__dirname, '..', 'static'); // Colors for console output const colors = { @@ -295,4 +295,4 @@ function runTests() { } // Run the tests -runTests(); \ No newline at end of file +runTests();