mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 17:03:15 +00:00
refactor(server): keep three suppressed lines whole so Prettier cannot move them past their directive
Prettier wraps the emoji regex onto the line after its declaration and spreads two any-cast lines in the plugin tests over several lines, which would leave the casts outside the eslint-disable-next-line above them. The regex directive now sits on the line right before the literal, the dev-link controller takes never instead of any for the collaborators it ignores, and the supervisor test reaches the private kill/onExit through one cast.
This commit is contained in:
@@ -72,7 +72,8 @@ describe('supervisor shutdownAll is a clean stop, not a crash', () => {
|
||||
(s as any).running.set('p', sup);
|
||||
// kill() simulates the child actually exiting during shutdown → fires onExit
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(s as any).kill = vi.fn(async (x: any) => { (s as any).onExit(x, 0, 'SIGTERM'); });
|
||||
const internals = s as any;
|
||||
internals.kill = vi.fn(async (x: unknown) => { internals.onExit(x, 0, 'SIGTERM'); });
|
||||
await s.shutdownAll();
|
||||
expect(sup.status).toBe('stopped'); // stopped before kill
|
||||
// onExit took the early-return path — no crash bookkeeping written to the DB hooks
|
||||
|
||||
Reference in New Issue
Block a user