diff --git a/tests/builder/pipeline.test.js b/tests/builder/pipeline.test.js index 2fe0c283..76624d61 100644 --- a/tests/builder/pipeline.test.js +++ b/tests/builder/pipeline.test.js @@ -15,9 +15,10 @@ let tmpDir; beforeAll(() => { tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-pipeline-')); - for (const file of fs.readdirSync(FIXTURE_DIR)) { - fs.copyFileSync(path.join(FIXTURE_DIR, file), path.join(tmpDir, file)); - } + fs.cpSync(FIXTURE_DIR, tmpDir, { + recursive: true, + filter: (src) => path.basename(src) !== '.codegraph', + }); }); afterAll(() => { diff --git a/tests/integration/scoped-rebuild.test.js b/tests/integration/scoped-rebuild.test.js index 9b6d699b..5f6eaa9a 100644 --- a/tests/integration/scoped-rebuild.test.js +++ b/tests/integration/scoped-rebuild.test.js @@ -18,9 +18,10 @@ let tmpDir; function copyFixture() { const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-scoped-')); - for (const file of fs.readdirSync(FIXTURE_DIR)) { - fs.copyFileSync(path.join(FIXTURE_DIR, file), path.join(dir, file)); - } + fs.cpSync(FIXTURE_DIR, dir, { + recursive: true, + filter: (src) => path.basename(src) !== '.codegraph', + }); return dir; }