@@ -337,6 +337,24 @@ describe('identifyPackages', () => {
337337 expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
338338 } ) ;
339339
340+ test ( 'should identify package by static-plugins path and name in production mode' , ( ) => {
341+ const result = identifyPackages (
342+ 'static-plugins/headlamp_minikube' ,
343+ '@headlamp-k8s/minikube' ,
344+ false
345+ ) ;
346+ expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
347+ } ) ;
348+
349+ test ( 'should identify package by static-plugins prerelease path and name in production mode' , ( ) => {
350+ const result = identifyPackages (
351+ 'static-plugins/headlamp_minikubeprerelease' ,
352+ '@headlamp-k8s/minikubeprerelease' ,
353+ false
354+ ) ;
355+ expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
356+ } ) ;
357+
340358 test ( 'should not identify package if path does not match' , ( ) => {
341359 const result = identifyPackages ( 'plugins/other_plugin' , '@headlamp-k8s/minikube' , false ) ;
342360 expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : false } ) ;
@@ -376,6 +394,15 @@ describe('identifyPackages', () => {
376394 expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
377395 } ) ;
378396
397+ test ( 'should handle windows paths for static-plugins' , ( ) => {
398+ const result = identifyPackages (
399+ 'static-plugins\\headlamp_minikube' ,
400+ '@headlamp-k8s/minikube' ,
401+ false
402+ ) ;
403+ expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
404+ } ) ;
405+
379406 test ( 'should handle windows paths in development mode' , ( ) => {
380407 const result = identifyPackages ( 'plugins\\minikube' , '@headlamp-k8s/minikube' , true ) ;
381408 expect ( result ) . toEqual ( { '@headlamp-k8s/minikube' : true } ) ;
0 commit comments