The #2018 regression test used raw fs.rmSync() in afterEach, tripping the local/no-raw-rmsync-in-tests eslint rule (Windows-EBUSY retry budget). CI's lint-tests job (no eslint cache) caught it on next; local --cache runs had false-greened it. Switch to helpers.cleanup(). Also drop two unused destructured imports (evaluateCommandExitZero, interpolate) in the gate-predicate-evaluator test that emitted no-unused-vars warnings. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -22,8 +22,6 @@ const fc = require('fast-check');
|
||||
|
||||
const {
|
||||
evaluatePredicate,
|
||||
evaluateCommandExitZero,
|
||||
interpolate,
|
||||
COMMAND_EXIT_ZERO_DEFAULT_TIMEOUT_MS,
|
||||
COMMAND_MAX_OUTPUT_CHARS,
|
||||
COMMAND_MAX_LENGTH,
|
||||
|
||||
@@ -13,6 +13,7 @@ const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const { _syncGsdDir } = require('../gsd-core/bin/lib/surface.cjs');
|
||||
const { cleanup } = require('./helpers.cjs');
|
||||
|
||||
function tmp() { return fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-surface-empty-')); }
|
||||
|
||||
@@ -26,7 +27,7 @@ describe('#2018 — empty manifest must not delete gsd-* agents', () => {
|
||||
}
|
||||
// Staged dir is EMPTY (unresolvable manifest → nothing staged)
|
||||
});
|
||||
afterEach(() => { try { fs.rmSync(dest, { recursive: true, force: true }); } catch {} try { fs.rmSync(staged, { recursive: true, force: true }); } catch {} });
|
||||
afterEach(() => { cleanup(dest); cleanup(staged); });
|
||||
|
||||
test('empty manifest → agents preserved (not deleted)', () => {
|
||||
_syncGsdDir(staged, dest, 'agents', new Map());
|
||||
|
||||
Reference in New Issue
Block a user