@@ -18,9 +18,9 @@ function createRecord(
1818 description : "测试工具" ,
1919 params,
2020 grants : [ ] ,
21- code : `// ==CATTool ==
21+ code : `// ==SkillScript ==
2222// @name test_tool
23- // ==/CATTool ==
23+ // ==/SkillScript ==
2424return args.value;` ,
2525 installtime : Date . now ( ) ,
2626 updatetime : Date . now ( ) ,
@@ -132,9 +132,9 @@ describe("SkillScriptExecutor", () => {
132132 description : "查天气" ,
133133 params : [ ] ,
134134 grants : [ "GM.xmlHttpRequest" ] ,
135- code : `// ==CATTool ==
135+ code : `// ==SkillScript ==
136136// @name weather
137- // ==/CATTool ==
137+ // ==/SkillScript ==
138138const result = await GM.xmlHttpRequest({url: "http://example.com"});
139139return result;` ,
140140 installtime : 1 ,
@@ -147,7 +147,7 @@ return result;`,
147147 const params = getCallParams ( sender ) ;
148148 expect ( params . grants ) . toEqual ( [ "GM.xmlHttpRequest" ] ) ;
149149 expect ( params . name ) . toBe ( "weather" ) ;
150- expect ( params . code ) . not . toContain ( "==CATTool ==" ) ;
150+ expect ( params . code ) . not . toContain ( "==SkillScript ==" ) ;
151151 } ) ;
152152
153153 it ( "应处理多个混合类型参数" , async ( ) => {
@@ -164,15 +164,15 @@ return result;`,
164164 expect ( getCallParams ( sender ) . args ) . toEqual ( { city : "上海" , days : 7 , detailed : true } ) ;
165165 } ) ;
166166
167- it ( "应生成 cattool - 前缀的 UUID" , async ( ) => {
167+ it ( "应生成 skillscript - 前缀的 UUID" , async ( ) => {
168168 const sender = createMockSender ( ) ;
169169 const record = createRecord ( ) ;
170170 const executor = new SkillScriptExecutor ( record , sender ) ;
171171
172172 await executor . execute ( { } ) ;
173173
174174 const params = getCallParams ( sender ) ;
175- expect ( params . uuid ) . toMatch ( / ^ c a t t o o l - / ) ;
175+ expect ( params . uuid ) . toMatch ( / ^ s k i l l s c r i p t - / ) ;
176176 expect ( params . uuid . length ) . toBeGreaterThan ( SKILL_SCRIPT_UUID_PREFIX . length ) ;
177177 } ) ;
178178
@@ -235,7 +235,7 @@ return result;`,
235235
236236describe ( "getSkillScriptNameByUuid" , ( ) => {
237237 it ( "未注册的 UUID 应返回空字符串" , ( ) => {
238- expect ( getSkillScriptNameByUuid ( "cattool -unknown-uuid" ) ) . toBe ( "" ) ;
238+ expect ( getSkillScriptNameByUuid ( "skillscript -unknown-uuid" ) ) . toBe ( "" ) ;
239239 } ) ;
240240
241241 it ( "空字符串应返回空字符串" , ( ) => {
@@ -245,7 +245,7 @@ describe("getSkillScriptNameByUuid", () => {
245245
246246describe ( "getSkillScriptGrantsByUuid" , ( ) => {
247247 it ( "未注册的 UUID 应返回空数组" , ( ) => {
248- expect ( getSkillScriptGrantsByUuid ( "cattool -unknown-uuid" ) ) . toEqual ( [ ] ) ;
248+ expect ( getSkillScriptGrantsByUuid ( "skillscript -unknown-uuid" ) ) . toEqual ( [ ] ) ;
249249 } ) ;
250250
251251 it ( "执行期间应能通过 UUID 获取 grants" , async ( ) => {
@@ -287,8 +287,8 @@ describe("getSkillScriptGrantsByUuid", () => {
287287} ) ;
288288
289289describe ( "SKILL_SCRIPT_UUID_PREFIX" , ( ) => {
290- it ( "应为 'cattool -'" , ( ) => {
291- expect ( SKILL_SCRIPT_UUID_PREFIX ) . toBe ( "cattool -" ) ;
290+ it ( "应为 'skillscript -'" , ( ) => {
291+ expect ( SKILL_SCRIPT_UUID_PREFIX ) . toBe ( "skillscript -" ) ;
292292 } ) ;
293293} ) ;
294294
@@ -525,7 +525,7 @@ describe("SkillScriptExecutor 超时处理", () => {
525525 await vi . advanceTimersByTimeAsync ( 30_000 ) ;
526526 await execPromise ;
527527
528- expect ( capturedUuid ) . toMatch ( / ^ c a t t o o l - / ) ;
528+ expect ( capturedUuid ) . toMatch ( / ^ s k i l l s c r i p t - / ) ;
529529 expect ( getSkillScriptNameByUuid ( capturedUuid ) ) . toBe ( "" ) ;
530530 } ) ;
531531
0 commit comments