aws / aws/agentcore-cli

src/io/watchFile.test.ts flaky test on refactor branch.

Open
#2,140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

```
src/io/watchFile.test.ts:
24 | watchFile(path, () => calls++, controller.signal);
25 |
26 | writeFileSync(path, '{"a":1}');
27 | writeFileSync(path, '{"a":2}');
28 | await Bun.sleep(250);
29 | expect(calls).toBe(1);
^
error: expect(received).toBe(expected)

Expected: 1
Received: 0

at (/Users/runner/work/agentcore-cli/agentcore-cli/src/io/watchFile.test.ts:29:17)

Error: Expected: 1
Received: 0

at (/Users/runner/work/agentcore-cli/agentcore-cli/src/io/watchFile.test.ts:29:17)
(fail) debounces a burst of edits into a single callback and stops on abort [257.78ms]
(pass) a missing file fails quietly rather than throwing [0.18ms]
```
Ex. https://github.com/aws/agentcore-cli/actions/runs/33117797255/job/98676836925

Seen it fail twice on MacOS, retrying fixed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.