mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix unit tests after introducing new injectables that have side effects
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
735cc8e7af
commit
c52826b450
4 files changed
+36
-3
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { getGlobalOverride } from "../test-utils/get-global-override";
|
||||
import windowLocationInjectable from "./window-location.injectable";
|
||||
|
||||
export default getGlobalOverride(windowLocationInjectable, () => ({
|
||||
host: "localhost",
|
||||
port: "12345",
|
||||
}));
|
||||
@@ -5,7 +5,7 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
|
||||
const getMillisecondsFromUnixEpochInjectable = getInjectable({
|
||||
id: "get-current-time",
|
||||
id: "get-milliseconds-from-unix-epoch",
|
||||
instantiate: () => () => Date.now(),
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user