diff --git a/apps/site/pages/en/learn/test-runner/using-test-runner.md b/apps/site/pages/en/learn/test-runner/using-test-runner.md index 155e710b8eba0..4d634b52b8c06 100644 --- a/apps/site/pages/en/learn/test-runner/using-test-runner.md +++ b/apps/site/pages/en/learn/test-runner/using-test-runner.md @@ -77,12 +77,15 @@ import { test } from 'node:test'; import { detectOsInUserAgent } from '…'; const userAgents = [ - { ua: /* … */, os: 'WIN' }, + { + ua: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3', + os: 'WIN', + }, // … ]; test('Detect OS via user-agent', { concurrency: true }, t => { - for (const { os, ua } from userAgents) { + for (const { os, ua } of userAgents) { t.test(ua, () => assert.equal(detectOsInUserAgent(ua), os)); } }); diff --git a/apps/site/scripts/lint-snippets/index.mjs b/apps/site/scripts/lint-snippets/index.mjs index fd155ce33a774..266dba933555b 100755 --- a/apps/site/scripts/lint-snippets/index.mjs +++ b/apps/site/scripts/lint-snippets/index.mjs @@ -79,10 +79,12 @@ function reportErrors(errors) { // Get all markdown files const filePaths = await glob('**/*.md', { root: process.cwd(), - cwd: 'apps/site/pages/en/learn/', + cwd: 'pages/en/learn/', absolute: true, }); +console.log(`Found ${filePaths.length} markdown files.`); + // Validate all files and collect errors const allErrors = await Promise.all(filePaths.map(validateFile));