1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix tests

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2021-09-29 18:31:09 +03:00
parent 92766e71e4
commit 494287132a
8 changed files with 14 additions and 27 deletions

View File

@ -220,7 +220,7 @@
"mock-fs": "^4.14.0",
"moment": "^2.29.1",
"moment-timezone": "^0.5.33",
"monaco-editor": "^0.26.1",
"monaco-editor": "^0.28.1",
"monaco-editor-webpack-plugin": "^4.2.0",
"node-fetch": "^2.6.1",
"node-pty": "^0.10.1",

View File

@ -23,8 +23,6 @@ import { SearchStore } from "../search-store";
import { Console } from "console";
import { stdout, stderr } from "process";
jest.mock("react-monaco-editor", () => null);
jest.mock("electron", () => ({
app: {
getPath: () => "/foo",

View File

@ -19,18 +19,17 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import { jest } from "@jest/globals";
import { ClusterPageRegistry, getExtensionPageUrl, GlobalPageRegistry, PageParams } from "../page-registry";
import { LensExtension } from "../../lens-extension";
import React from "react";
import fse from "fs-extra";
import { Console } from "console";
import { stdout, stderr } from "process";
import { stderr, stdout } from "process";
import { TerminalStore } from "../../../renderer/components/dock/terminal.store";
import { ThemeStore } from "../../../renderer/theme.store";
import { TerminalStore } from "../../renderer-api/components";
import { UserStore } from "../../../common/user-store";
jest.mock("react-monaco-editor", () => null);
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",

View File

@ -31,14 +31,6 @@ import { ThemeStore } from "../../../theme.store";
import { TerminalStore } from "../terminal.store";
import { UserStore } from "../../../../common/user-store";
jest.mock("react-monaco-editor", () => ({
monaco: {
editor: {
getModel: jest.fn()
}
},
}));
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",

View File

@ -32,8 +32,6 @@ import { ThemeStore } from "../../../theme.store";
import { UserStore } from "../../../../common/user-store";
import mockFs from "mock-fs";
jest.mock("react-monaco-editor", () => null);
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",

View File

@ -29,8 +29,6 @@ import { TerminalStore } from "../terminal.store";
import { deploymentPod1, deploymentPod2, deploymentPod3, dockerPod } from "./pod.mock";
import fse from "fs-extra";
jest.mock("react-monaco-editor", () => null);
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",

View File

@ -58,6 +58,11 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
cache: isDevelopment,
entry: {
[appName]: path.resolve(rendererDir, "bootstrap.tsx"),
"editor.worker": "monaco-editor/esm/vs/editor/editor.worker.js",
"json.worker": "monaco-editor/esm/vs/language/json/json.worker",
"css.worker": "monaco-editor/esm/vs/language/css/css.worker",
"html.worker": "monaco-editor/esm/vs/language/html/html.worker",
"ts.worker": "monaco-editor/esm/vs/language/typescript/ts.worker",
},
output: {
libraryTarget: "global",

View File

@ -9780,6 +9780,11 @@ monaco-editor@^0.26.1:
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.26.1.tgz#62bb5f658bc95379f8abb64b147632bd1c019d73"
integrity sha512-mm45nUrBDk0DgZKgbD7+bhDOtcAFNGPJJRAdS6Su1kTGl6XEgC7U3xOmDUW/0RrLf+jlvCGaqLvD4p2VjwuwwQ==
monaco-editor@^0.28.1:
version "0.28.1"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.28.1.tgz#732788ff2172d59e6d436b206da8cac715413940"
integrity sha512-P1vPqxB4B1ZFzTeR1ScggSp9/5NoQrLCq88fnlNUsuRAP1usEBN4TIpI2lw0AYIZNVIanHk0qwjze2uJwGOHUw==
moo-color@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/moo-color/-/moo-color-1.0.2.tgz#837c40758d2d58763825d1359a84e330531eca64"
@ -10271,7 +10276,6 @@ npm@^6.14.15:
cmd-shim "^3.0.3"
columnify "~1.5.4"
config-chain "^1.1.12"
debuglog "*"
detect-indent "~5.0.0"
detect-newline "^2.1.0"
dezalgo "~1.0.3"
@ -10286,7 +10290,6 @@ npm@^6.14.15:
has-unicode "~2.0.1"
hosted-git-info "^2.8.9"
iferr "^1.0.2"
imurmurhash "*"
infer-owner "^1.0.4"
inflight "~1.0.6"
inherits "^2.0.4"
@ -10305,14 +10308,8 @@ npm@^6.14.15:
libnpx "^10.2.4"
lock-verify "^2.1.0"
lockfile "^1.0.4"
lodash._baseindexof "*"
lodash._baseuniq "~4.6.0"
lodash._bindcallback "*"
lodash._cacheindexof "*"
lodash._createcache "*"
lodash._getnative "*"
lodash.clonedeep "~4.5.0"
lodash.restparam "*"
lodash.union "~4.6.0"
lodash.uniq "~4.5.0"
lodash.without "~4.4.0"