diff options
| author | Agando <roduccomm@gmail.com> | 2026-09-29 13:10:37 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-09-29 13:10:37 +0200 |
| commit | f5a591ed70327be2d2703879b03d9cf0229ade86 (patch) | |
| tree | 1150497448e7014512f9235f7da7f026e6c94f4e /scripts/test-fs-commands.mjs | |
| parent | d2c4913c17cb7ea8f2c3bd27b8e4b3990f8bc79e (diff) | |
test: exact-delta assertions for tail -f follow/stop semantics
Diffstat (limited to 'scripts/test-fs-commands.mjs')
| -rw-r--r-- | scripts/test-fs-commands.mjs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/test-fs-commands.mjs b/scripts/test-fs-commands.mjs index 6f87708..72f81ae 100644 --- a/scripts/test-fs-commands.mjs +++ b/scripts/test-fs-commands.mjs @@ -129,9 +129,10 @@ const L12 = ['l1','l2','l3','l4','l5','l6','l7','l8','l9','l10','l11','l12'].joi await sleep(1700); check('tail -f prints appended line', out.some(o => o.text === '\nc'), out.map(o => o.text)); check('tail -f stopFollow clears', terminal.stopFollow() === true && terminal._activeFollow === null); + const baseline = out.length; ctx.__test.files.set('log.txt', 'a\nb\nc\nd'); await sleep(1700); - check('no output after stopFollow', !out.some(o => o.text.includes('d')), out.map(o => o.text)); + check('no output after stopFollow', out.length === baseline, out.slice(baseline).map(o => o.text)); } { const { mod, terminal, out, ctx } = scenario({ 'log.txt': 'aaaa' }); |