@@ -4,20 +4,20 @@ This directory includes tests for the JavaScript frontmatter hash implementation
44
55## Running Tests
66
7- ### Standard Test Suite (with mocks )
7+ ### Integration Test Suite (not part of default ` npm run test:js ` )
88``` bash
9- npm test -- frontmatter_hash_github_api.test.cjs
9+ npm run test:js-integration-live-api
1010```
1111
12- This runs all tests including mocked GitHub API calls .
12+ This runs ` frontmatter_hash_github_api.test.cjs ` , including mocked GitHub API coverage and the optional live API check .
1313
1414### Live GitHub API Test (no mocks)
1515
1616The test suite includes a live API test that fetches real data from the GitHub repository. To run it, you need a GitHub token:
1717
18- #### Option 1: Run via npm test
18+ #### Option 1: Run via npm integration script
1919``` bash
20- GITHUB_TOKEN=ghp_your_token_here npm test -- frontmatter_hash_github_api.test.cjs
20+ GITHUB_TOKEN=ghp_your_token_here npm run test:js-integration-live-api
2121```
2222
2323#### Option 2: Run standalone script
@@ -56,7 +56,7 @@ This validates that the JavaScript hash implementation works correctly with real
5656stdout | frontmatter_hash_github_api.test.cjs > live GitHub API integration > should compute hash using real GitHub API (no mocks)
5757Skipping live API test - no GITHUB_TOKEN or GH_TOKEN available
5858To run this test, set GITHUB_TOKEN or GH_TOKEN environment variable
59- Example: GITHUB_TOKEN=ghp_xxx npm test -- frontmatter_hash_github_api.test.cjs
59+ Example: GITHUB_TOKEN=ghp_xxx npm run test:js-integration-live-api
6060
6161 ✓ frontmatter_hash_github_api.test.cjs (10 tests) 16ms
6262```
0 commit comments