From e8a0249e6bfcb1641b38c95975c2e9924d200f98 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Mon, 29 Sep 2025 07:35:42 -0700 Subject: [PATCH] fix windows test for new extension installation (#10164) --- packages/cli/src/commands/extensions/new.test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/commands/extensions/new.test.ts b/packages/cli/src/commands/extensions/new.test.ts index 0b660d55e0..7d9480fcb5 100644 --- a/packages/cli/src/commands/extensions/new.test.ts +++ b/packages/cli/src/commands/extensions/new.test.ts @@ -8,6 +8,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { newCommand } from './new.js'; import yargs from 'yargs'; import * as fsPromises from 'node:fs/promises'; +import path from 'node:path'; vi.mock('node:fs/promises'); @@ -53,18 +54,18 @@ describe('extensions new command', () => { recursive: true, }); expect(mockedFs.cp).toHaveBeenCalledWith( - expect.stringContaining('context/context'), - '/some/path/context', + expect.stringContaining(path.normalize('context/context')), + path.normalize('/some/path/context'), { recursive: true }, ); expect(mockedFs.cp).toHaveBeenCalledWith( - expect.stringContaining('context/custom-commands'), - '/some/path/custom-commands', + expect.stringContaining(path.normalize('context/custom-commands')), + path.normalize('/some/path/custom-commands'), { recursive: true }, ); expect(mockedFs.cp).toHaveBeenCalledWith( - expect.stringContaining('context/mcp-server'), - '/some/path/mcp-server', + expect.stringContaining(path.normalize('context/mcp-server')), + path.normalize('/some/path/mcp-server'), { recursive: true }, ); });