From 80a8ec27a1a339f7bfa9b15494574fc217b3e32f Mon Sep 17 00:00:00 2001 From: Damien de Lemeny Date: Thu, 16 May 2024 14:39:16 -0500 Subject: [PATCH 1/2] Move jest mocks to dedicated folder --- quickwit/quickwit-ui/{ => mocks}/monacoMock.js | 0 quickwit/quickwit-ui/{ => mocks}/swaggerUIMock.js | 0 quickwit/quickwit-ui/package.json | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename quickwit/quickwit-ui/{ => mocks}/monacoMock.js (100%) rename quickwit/quickwit-ui/{ => mocks}/swaggerUIMock.js (100%) diff --git a/quickwit/quickwit-ui/monacoMock.js b/quickwit/quickwit-ui/mocks/monacoMock.js similarity index 100% rename from quickwit/quickwit-ui/monacoMock.js rename to quickwit/quickwit-ui/mocks/monacoMock.js diff --git a/quickwit/quickwit-ui/swaggerUIMock.js b/quickwit/quickwit-ui/mocks/swaggerUIMock.js similarity index 100% rename from quickwit/quickwit-ui/swaggerUIMock.js rename to quickwit/quickwit-ui/mocks/swaggerUIMock.js diff --git a/quickwit/quickwit-ui/package.json b/quickwit/quickwit-ui/package.json index 076792938e4..ee6886468f6 100644 --- a/quickwit/quickwit-ui/package.json +++ b/quickwit/quickwit-ui/package.json @@ -79,8 +79,8 @@ }, "jest": { "moduleNameMapper": { - "monaco-editor": "/monacoMock.js", - "swagger-ui-react": "/swaggerUIMock.js" + "monaco-editor": "/mocks/monacoMock.js", + "swagger-ui-react": "/mocks/swaggerUIMock.js" } } } From 0cdd7a8c534e952440258482b81320fb3b32708e Mon Sep 17 00:00:00 2001 From: Damien de Lemeny Date: Thu, 16 May 2024 14:40:22 -0500 Subject: [PATCH 2/2] Add x-charts LineChart mock --- quickwit/quickwit-ui/mocks/x-charts.js | 1 + quickwit/quickwit-ui/package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 quickwit/quickwit-ui/mocks/x-charts.js diff --git a/quickwit/quickwit-ui/mocks/x-charts.js b/quickwit/quickwit-ui/mocks/x-charts.js new file mode 100644 index 00000000000..4a777a1ce84 --- /dev/null +++ b/quickwit/quickwit-ui/mocks/x-charts.js @@ -0,0 +1 @@ +export const LineChart = ({ children }) => children; diff --git a/quickwit/quickwit-ui/package.json b/quickwit/quickwit-ui/package.json index ee6886468f6..e09a771f21e 100644 --- a/quickwit/quickwit-ui/package.json +++ b/quickwit/quickwit-ui/package.json @@ -80,7 +80,8 @@ "jest": { "moduleNameMapper": { "monaco-editor": "/mocks/monacoMock.js", - "swagger-ui-react": "/mocks/swaggerUIMock.js" + "swagger-ui-react": "/mocks/swaggerUIMock.js", + "@mui/x-charts": "/mocks/x-charts.js" } } }