Skip to content

Commit 02450dd

Browse files
committed
chore(docs): drop inline require for readFileSync (Gemini adjudication)
Hoist readFileSync to the top-of-file `node:fs` import group rather than require()-ing it inline in the test body. ESM-consistent with the rest of the file. Gemini Code Assist flagged the same issue at line 23 + line 295 — both accept (real consistency improvement, trivial fix, zero behavioral risk). Vitest still 23/23 green; prettier check green. Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai>
1 parent 073e0a5 commit 02450dd

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

ui/src/__tests__/scripts/copy-docs.prune.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@
2020
* `import.meta.url`, so the result is cwd-invariant by construction.
2121
*/
2222

23-
import { existsSync, mkdtempSync, mkdirSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
23+
import {
24+
existsSync,
25+
mkdtempSync,
26+
mkdirSync,
27+
readdirSync,
28+
readFileSync,
29+
rmSync,
30+
writeFileSync,
31+
} from 'node:fs';
2432
import { tmpdir } from 'node:os';
2533
import { join, resolve } from 'node:path';
2634
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
@@ -291,7 +299,6 @@ describe('copyImageAssets — tutorial-image ferry (chore_overnight_result_card_
291299

292300
copyImageAssets(srcImagesTmp, destImagesTmp);
293301

294-
const { readFileSync } = require('node:fs') as typeof import('node:fs');
295302
expect(readFileSync(join(destImagesTmp, '12-foo.png'), 'utf-8')).toBe('NEW BYTES');
296303
});
297304
});

0 commit comments

Comments
 (0)