Re-add functionality for Installed and NotInstalled options in the menus (#2233)

* fix(menus): Handle Installed and NotInstalled options correctly in the
menus

This functionality was temporarily removed. This commit adds that
functionality back.

* fix(tests): Mock InstalledRemotePackageNamesFn when necessary
This commit is contained in:
Joey Holtzman
2023-07-06 01:54:21 -05:00
committed by GitHub
parent 6dd7933fbe
commit dadc8c0d98
5 changed files with 25 additions and 14 deletions

View File

@@ -138,7 +138,8 @@ func TestIntegrationLocalInstall(t *testing.T) {
return nil
},
LocalPackageFn: func(s string) mock.IPackage { return nil },
LocalPackageFn: func(s string) mock.IPackage { return nil },
InstalledRemotePackageNamesFn: func() []string { return []string{} },
}
config := &settings.Configuration{
@@ -417,6 +418,7 @@ func TestIntegrationLocalInstallNeeded(t *testing.T) {
return nil
},
InstalledRemotePackageNamesFn: func() []string { return []string{} },
}
config := &settings.Configuration{
@@ -580,6 +582,7 @@ func TestIntegrationLocalInstallGenerateSRCINFO(t *testing.T) {
return nil
},
InstalledRemotePackageNamesFn: func() []string { return []string{} },
}
config := &settings.Configuration{
@@ -841,7 +844,8 @@ func TestIntegrationLocalInstallWithDepsProvides(t *testing.T) {
SyncSatisfierFn: func(s string) mock.IPackage {
return nil
},
LocalPackageFn: func(s string) mock.IPackage { return nil },
LocalPackageFn: func(s string) mock.IPackage { return nil },
InstalledRemotePackageNamesFn: func() []string { return []string{} },
}
config := &settings.Configuration{
@@ -980,7 +984,8 @@ func TestIntegrationLocalInstallTwoSrcInfosWithDeps(t *testing.T) {
SyncSatisfierFn: func(s string) mock.IPackage {
return nil
},
LocalPackageFn: func(s string) mock.IPackage { return nil },
LocalPackageFn: func(s string) mock.IPackage { return nil },
InstalledRemotePackageNamesFn: func() []string { return []string{} },
}
config := &settings.Configuration{