@@ -17,12 +17,14 @@ describe("e2e: skill", () => {
1717 test ( "skill add --help exits successfully" , async ( ) => {
1818 const { stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [ "skill" , "add" , "--help" ] ) ;
1919 expect ( exitCode , stderr ) . toBe ( 0 ) ;
20+ expect ( stderr ) . toMatch ( / - - a l l / ) ;
2021 expect ( stderr ) . toMatch ( / - - n a m e / ) ;
2122 } ) ;
2223
2324 test ( "skill update --help exits successfully" , async ( ) => {
2425 const { stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [ "skill" , "update" , "--help" ] ) ;
2526 expect ( exitCode , stderr ) . toBe ( 0 ) ;
27+ expect ( stderr ) . toMatch ( / - - a l l / ) ;
2628 expect ( stderr ) . toMatch ( / - - n a m e / ) ;
2729 } ) ;
2830
@@ -37,41 +39,47 @@ describe("e2e: skill", () => {
3739 expect ( exitCode , stderr ) . toBe ( 0 ) ;
3840 expect ( stderr ) . toMatch ( / l i s t | r e g i s t r y / i) ;
3941 } ) ;
42+
43+ test ( "skill init --help exits successfully" , async ( ) => {
44+ const { stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [ "skill" , "init" , "--help" ] ) ;
45+ expect ( exitCode , stderr ) . toBe ( 0 ) ;
46+ expect ( stderr ) . toMatch ( / b a i l i a n / i) ;
47+ } ) ;
4048} ) ;
4149
4250// Local-only cases: auth "none" + validation happens before any network access, no gating needed
4351describe ( "e2e: skill (local, no credentials)" , ( ) => {
44- test ( "skill add without --name errors as usage error (2)" , async ( ) => {
52+ test ( "skill add without --all or -- name errors as usage error (2)" , async ( ) => {
4553 const { stdout, stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [
4654 "skill" ,
4755 "add" ,
4856 "--quiet" ,
4957 ] ) ;
5058 expect ( exitCode ) . toBe ( 2 ) ;
51- expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / - - n a m e | U s a g e : / i) ;
59+ expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / - - a l l | - - n a m e | U s a g e : / i) ;
5260 } ) ;
5361
54- test ( "skill remove without --name errors as usage error (2)" , async ( ) => {
62+ test ( "skill add with both --all and --name errors as usage error (2)" , async ( ) => {
5563 const { stdout, stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [
5664 "skill" ,
57- "remove" ,
65+ "add" ,
66+ "--all" ,
67+ "--name" ,
68+ "spark-video" ,
5869 "--quiet" ,
5970 ] ) ;
6071 expect ( exitCode ) . toBe ( 2 ) ;
61- expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / - - n a m e | U s a g e : / i) ;
72+ expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / - - a l l | - - n a m e | e i t h e r / i) ;
6273 } ) ;
6374
64- test ( "skill add rejects mixing all with specific names (2)" , async ( ) => {
65- // parseSkillNames throws UsageError before fetchSkillsIndex — offline-safe
75+ test ( "skill remove without --name errors as usage error (2)" , async ( ) => {
6676 const { stdout, stderr, exitCode } = await runCommandE2e ( SKILL_ROUTES , [
6777 "skill" ,
68- "add" ,
69- "--name" ,
70- "all,spark-video" ,
78+ "remove" ,
7179 "--quiet" ,
7280 ] ) ;
7381 expect ( exitCode ) . toBe ( 2 ) ;
74- expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / a l l / i) ;
82+ expect ( `${ stdout } \n${ stderr } ` ) . toMatch ( / - - n a m e | U s a g e : / i) ;
7583 } ) ;
7684
7785 test ( "skill remove of a not-installed skill fails with reason (1)" , async ( ) => {
0 commit comments