Skip to content

Commit a776885

Browse files
thymikeeclaude
andcommitted
style(test): use String.raw for the escaped daemon fixture literals
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent db00b71 commit a776885

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/__tests__/daemon-fixture-launch-guard.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ test('the repo scan follows renamed and re-exported fixture helpers but leaves o
8888
assert.match(violations[0]!, /src\/consumer.test.ts/);
8989
});
9090

91-
for (const specifier of ['..', '.', '.\\u002e']) {
91+
for (const specifier of ['..', '.', String.raw`.\u002e`]) {
9292
test(`the repo scan follows a fixture family imported through '${specifier}'`, () => {
9393
const bad = `import { runCmdDetachedMonitored } from '@agent-device/host-kit/command'; const spawn = vi.mocked(runCmdDetachedMonitored); spawn.mockImplementation(() => { throw new Error('raw'); });`;
9494
const consumer =

‎scripts/lib/daemon-fixture-launch-guard.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const FAMILY_SEED = 'createRegisteredDaemonFixtures';
5656

5757
/** A cheap superset of seed files: the name in plain text, or any escape that could spell it. */
5858
function mayNameSeed(source: string): boolean {
59-
return source.includes(FAMILY_SEED) || source.includes('\\u');
59+
return source.includes(FAMILY_SEED) || source.includes(String.raw`\u`);
6060
}
6161

6262
function namesSeed(program: AstNode): boolean {

0 commit comments

Comments
 (0)