mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify test setup by removing option for global overrides (#7302)
* Remove option to doGeneralOverrides and do it always Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Override telemetry by default to optimize and simplify testing Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Simplify more usages of getDiForUnitTesting Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Fix code style Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> --------- Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
8fa92c06ea
commit
0d480917cf
95 files changed
+165
-161
No files matched your search
@@ -23,7 +23,7 @@ describe("ExtensionLoader", () => {
|
||||
let updateExtensionStateMock: jest.Mock;
|
||||
|
||||
beforeEach(() => {
|
||||
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||
const di = getDiForUnitTesting();
|
||||
|
||||
di.override(directoryForUserDataInjectable, () => "/some-directory-for-user-data");
|
||||
di.override(currentlyInClusterFrameInjectable, () => false);
|
||||
|
||||
@@ -32,7 +32,7 @@ describe("ExtensionDiscovery", () => {
|
||||
let homeDirectoryPath: string;
|
||||
|
||||
beforeEach(() => {
|
||||
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||
const di = getDiForUnitTesting();
|
||||
|
||||
di.override(directoryForUserDataInjectable, () => "/some-directory-for-user-data");
|
||||
di.override(installExtensionInjectable, () => () => Promise.resolve());
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ describe("ensure-hashed-directory-for-extension", () => {
|
||||
let registeredExtensions: ObservableMap<string, string>;
|
||||
|
||||
beforeEach(() => {
|
||||
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||
const di = getDiForUnitTesting();
|
||||
|
||||
ensureDirMock = jest.fn();
|
||||
|
||||
|
||||
Reference in new issue
Block a user