mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve documentation of Singleton functions, change to createInstance (#2585)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
33ca6c9c17
commit
b63fdfaff3
15 files changed
+90
-68
No files matched your search
@@ -42,16 +42,16 @@ describe("Extensions", () => {
|
||||
UserStore.resetInstance();
|
||||
ThemeStore.resetInstance();
|
||||
|
||||
await UserStore.getInstanceOrCreate().load();
|
||||
await ThemeStore.getInstanceOrCreate().init();
|
||||
await UserStore.createInstance().load();
|
||||
await ThemeStore.createInstance().init();
|
||||
|
||||
ExtensionLoader.resetInstance();
|
||||
ExtensionDiscovery.resetInstance();
|
||||
Extensions.installStates.clear();
|
||||
|
||||
ExtensionDiscovery.getInstanceOrCreate().uninstallExtension = jest.fn(() => Promise.resolve());
|
||||
ExtensionDiscovery.createInstance().uninstallExtension = jest.fn(() => Promise.resolve());
|
||||
|
||||
ExtensionLoader.getInstanceOrCreate().addExtension({
|
||||
ExtensionLoader.createInstance().addExtension({
|
||||
id: "extensionId",
|
||||
manifest: {
|
||||
name: "test",
|
||||
|
||||
@@ -44,8 +44,8 @@ const getFewPodsTabData = (): LogTabData => {
|
||||
|
||||
describe("<LogResourceSelector />", () => {
|
||||
beforeEach(() => {
|
||||
UserStore.getInstanceOrCreate();
|
||||
ThemeStore.getInstanceOrCreate();
|
||||
UserStore.createInstance();
|
||||
ThemeStore.createInstance();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -16,7 +16,7 @@ const cluster: Cluster = new Cluster({
|
||||
|
||||
describe("<MainLayoutHeader />", () => {
|
||||
beforeEach(() => {
|
||||
ClusterStore.getInstanceOrCreate();
|
||||
ClusterStore.createInstance();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in new issue
Block a user