aboutsummaryrefslogtreecommitdiff
path: root/scripts/test-fs-commands.mjs
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-09-29 13:10:37 +0200
committerAgando <roduccomm@gmail.com>2026-09-29 13:10:37 +0200
commitcf43aa8bcc92909af99545d7c29dbf3e1a52db23 (patch)
treeda4e2d476654e4cc88c5759d617538ebf88e8f44 /scripts/test-fs-commands.mjs
parent534fc0f767b681e7025188092251a12fce77dc74 (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.mjs3
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' });