@@ -82,19 +82,27 @@ describe('prefix parser', () => {
8282 } )
8383 } )
8484
85- describe ( '@ prefix (curator and collection )' , ( ) => {
85+ describe ( '@ prefix (curator and scoped npm )' , ( ) => {
8686 it ( 'parses @handle as curator' , ( ) => {
8787 expect ( parseSkillInput ( '@antfu' ) ) . toEqual ( {
8888 type : 'curator' ,
8989 handle : 'antfu' ,
9090 } )
9191 } )
9292
93- it ( 'parses @handle/collection as collection' , ( ) => {
94- expect ( parseSkillInput ( '@antfu/vue-stack' ) ) . toEqual ( {
95- type : 'collection' ,
96- handle : 'antfu' ,
97- name : 'vue-stack' ,
93+ it ( 'parses @scope/pkg as bare scoped npm package' , ( ) => {
94+ expect ( parseSkillInput ( '@nuxt/fonts' ) ) . toEqual ( {
95+ type : 'bare' ,
96+ package : '@nuxt/fonts' ,
97+ tag : undefined ,
98+ } )
99+ } )
100+
101+ it ( 'parses @scope/pkg@tag as bare scoped npm with tag' , ( ) => {
102+ expect ( parseSkillInput ( '@nuxt/fonts@1.0.0' ) ) . toEqual ( {
103+ type : 'bare' ,
104+ package : '@nuxt/fonts' ,
105+ tag : '1.0.0' ,
98106 } )
99107 } )
100108 } )
@@ -177,8 +185,8 @@ describe('prefix parser', () => {
177185 expect ( resolveSkillName ( '@antfu' ) ) . toBeNull ( )
178186 } )
179187
180- it ( 'returns null for collection ' , ( ) => {
181- expect ( resolveSkillName ( '@antfu/utils ' ) ) . toBeNull ( )
188+ it ( 'returns scoped name for @scope/pkg ' , ( ) => {
189+ expect ( resolveSkillName ( '@nuxt/fonts ' ) ) . toBe ( '@nuxt/fonts' )
182190 } )
183191
184192 it ( 'returns crate:<name> for crate inputs' , ( ) => {
0 commit comments