@@ -133,13 +133,8 @@ describe("MCP Agent registration", () => {
133133 } ,
134134 {
135135 agent : "qwenwork" as const ,
136- path :
137- process . platform === "darwin"
138- ? [ "Library" , "Application Support" , "QwenWorkCN" , "mcp.json" ]
139- : process . platform === "win32"
140- ? [ "AppData" , "Roaming" , "QwenWorkCN" , "mcp.json" ]
141- : [ ".config" , "QwenWorkCN" , "mcp.json" ] ,
142- streamable : { type : "http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
136+ path : [ ".qwenworkcn" , "mcp.json" ] ,
137+ streamable : { type : "streamable-http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
143138 sse : { type : "sse" , url : spec ( "sse" ) . endpoint , headers : spec ( "sse" ) . headers } ,
144139 } ,
145140 ] ) (
@@ -282,7 +277,7 @@ describe("MCP Agent registration", () => {
282277 } ) ;
283278 } ) ;
284279
285- test ( "qwenwork writes Electron userData mcp.json and never uses Qoder Work" , ( ) => {
280+ test ( "qwenwork writes ~/.qwenworkcn/ mcp.json and never uses Qoder Work" , ( ) => {
286281 mkdirSync ( join ( home , ".qoderwork" ) , { recursive : true } ) ;
287282 const [ result ] = connectMcpAgents ( {
288283 agents : [ "qwenwork" ] ,
@@ -292,23 +287,18 @@ describe("MCP Agent registration", () => {
292287 configDir,
293288 } ) ;
294289 expect ( result . status ) . toBe ( "added" ) ;
295- expect ( result . path ) . toBe ( qwenworkMcpPath ( home ) ) ;
290+ expect ( result . path ) . toBe ( join ( home , ".qwenworkcn" , "mcp.json" ) ) ;
296291 expect ( result . path ) . not . toContain ( ".qoderwork" ) ;
297292 expect ( existsSync ( join ( home , ".qoderwork" , "mcp.json" ) ) ) . toBe ( false ) ;
298293 expect ( readJson ( result . path ) ) . toMatchObject ( {
299294 mcpServers : {
300- ImageGenerate : { type : "http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
295+ ImageGenerate : { type : "streamable- http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
301296 } ,
302297 } ) ;
303298 } ) ;
304299
305- test ( "qwenwork prefers an existing QwenWork mcp.json over creating QwenWorkCN" , ( ) => {
306- const intlPath =
307- process . platform === "darwin"
308- ? join ( home , "Library" , "Application Support" , "QwenWork" , "mcp.json" )
309- : process . platform === "win32"
310- ? join ( home , "AppData" , "Roaming" , "QwenWork" , "mcp.json" )
311- : join ( home , ".config" , "QwenWork" , "mcp.json" ) ;
300+ test ( "qwenwork prefers an existing ~/.qwenwork/mcp.json over creating .qwenworkcn" , ( ) => {
301+ const intlPath = join ( home , ".qwenwork" , "mcp.json" ) ;
312302 mkdirSync ( join ( intlPath , ".." ) , { recursive : true } ) ;
313303 writeFileSync ( intlPath , JSON . stringify ( { keep : true } ) ) ;
314304
@@ -323,7 +313,7 @@ describe("MCP Agent registration", () => {
323313 expect ( readJson ( intlPath ) ) . toMatchObject ( {
324314 keep : true ,
325315 mcpServers : {
326- ImageGenerate : { type : "http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
316+ ImageGenerate : { type : "streamable- http" , url : spec ( ) . endpoint , headers : spec ( ) . headers } ,
327317 } ,
328318 } ) ;
329319 } ) ;
0 commit comments