diff options
| author | Keith Ballinger <[email protected]> | 2025-06-25 21:45:39 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-26 04:45:39 +0000 |
| commit | 891116a6c2ab0a35ccabba9cbc70b7d3aea3587e (patch) | |
| tree | 4a8afaebc2fa2bdbeb638e99c396c6f69a497bf3 /integration-tests | |
| parent | dbe217828d71794e85e7b03592639be0b81463cb (diff) | |
Flaky test (#1405)
Co-authored-by: matt korwel <[email protected]>
Co-authored-by: Scott Densmore <[email protected]>
Diffstat (limited to 'integration-tests')
| -rw-r--r-- | integration-tests/list_directory.test.js | 1 | ||||
| -rw-r--r-- | integration-tests/test-helper.js | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/integration-tests/list_directory.test.js b/integration-tests/list_directory.test.js index 987a2351..6bbcde63 100644 --- a/integration-tests/list_directory.test.js +++ b/integration-tests/list_directory.test.js @@ -13,6 +13,7 @@ test('should be able to list a directory', async (t) => { rig.setup(t.name); rig.createFile('file1.txt', 'file 1 content'); rig.mkdir('subdir'); + rig.sync(); const prompt = `Can you list the files in the current directory`; const result = await rig.run(prompt); diff --git a/integration-tests/test-helper.js b/integration-tests/test-helper.js index acc0035a..eb598bd9 100644 --- a/integration-tests/test-helper.js +++ b/integration-tests/test-helper.js @@ -42,6 +42,11 @@ export class TestRig { mkdirSync(join(this.testDir, dir)); } + sync() { + // ensure file system is done before spawning + execSync('sync', { cwd: this.testDir }); + } + run(prompt, ...args) { const output = execSync( `node ${this.bundlePath} --yolo --prompt "${prompt}" ${args.join(' ')}`, |
