From 51fa6f9dcac6465c55639e6494f341e4cca80b09 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Tue, 25 Jun 2024 17:47:49 +0900 Subject: [PATCH 1/4] Rename test files *.test.* that contain unit tests to *.spec.* because unit tests represents the specs --- .../src/{promise-delegate.test.ts => promise-delegate.spec.ts} | 0 .../src/{requirements-txt.test.ts => requirements-txt.spec.ts} | 0 .../common/src/{requirements.test.ts => requirements.spec.ts} | 0 .../bin-src/dump_artifacts/{manifest.test.ts => manifest.spec.ts} | 0 .../desktop/electron/{ipc-utils.test.ts => ipc-utils.spec.ts} | 0 .../electron/{worker-options.test.ts => worker-options.spec.ts} | 0 packages/kernel/src/{file.test.ts => file.spec.ts} | 0 .../src/{module-auto-load.test.ts => module-auto-load.spec.ts} | 0 .../kernel/src/{pyodide-loader.test.ts => pyodide-loader.spec.ts} | 0 .../{iframe-manipulation.test.ts => iframe-manipulation.spec.ts} | 0 .../CustomComponentIFrame/{index.test.tsx => index.spec.tsx} | 0 .../CustomComponentIFrame/{url.test.ts => url.spec.ts} | 0 .../{download-button.test.ts => download-button.spec.ts} | 0 packages/kernel/src/{url.test.ts => url.spec.ts} | 0 packages/mountable/src/{options.test.ts => options.spec.ts} | 0 packages/mountable/src/{url.test.ts => url.spec.ts} | 0 packages/sharing-common/src/{buffer.test.ts => buffer.spec.ts} | 0 .../sharing-common/src/{compress.test.ts => compress.spec.ts} | 0 packages/sharing-common/src/{url.test.ts => url.spec.ts} | 0 packages/sharing-editor/src/export/{html.test.ts => html.spec.ts} | 0 packages/sharing-editor/src/{path.test.ts => path.spec.ts} | 0 packages/sharing/src/{App.test.tsx => App.spec.tsx} | 0 22 files changed, 0 insertions(+), 0 deletions(-) rename packages/common/src/{promise-delegate.test.ts => promise-delegate.spec.ts} (100%) rename packages/common/src/{requirements-txt.test.ts => requirements-txt.spec.ts} (100%) rename packages/common/src/{requirements.test.ts => requirements.spec.ts} (100%) rename packages/desktop/bin-src/dump_artifacts/{manifest.test.ts => manifest.spec.ts} (100%) rename packages/desktop/electron/{ipc-utils.test.ts => ipc-utils.spec.ts} (100%) rename packages/desktop/electron/{worker-options.test.ts => worker-options.spec.ts} (100%) rename packages/kernel/src/{file.test.ts => file.spec.ts} (100%) rename packages/kernel/src/{module-auto-load.test.ts => module-auto-load.spec.ts} (100%) rename packages/kernel/src/{pyodide-loader.test.ts => pyodide-loader.spec.ts} (100%) rename packages/kernel/src/react-helpers/CustomComponentIFrame/{iframe-manipulation.test.ts => iframe-manipulation.spec.ts} (100%) rename packages/kernel/src/react-helpers/CustomComponentIFrame/{index.test.tsx => index.spec.tsx} (100%) rename packages/kernel/src/react-helpers/CustomComponentIFrame/{url.test.ts => url.spec.ts} (100%) rename packages/kernel/src/react-helpers/{download-button.test.ts => download-button.spec.ts} (100%) rename packages/kernel/src/{url.test.ts => url.spec.ts} (100%) rename packages/mountable/src/{options.test.ts => options.spec.ts} (100%) rename packages/mountable/src/{url.test.ts => url.spec.ts} (100%) rename packages/sharing-common/src/{buffer.test.ts => buffer.spec.ts} (100%) rename packages/sharing-common/src/{compress.test.ts => compress.spec.ts} (100%) rename packages/sharing-common/src/{url.test.ts => url.spec.ts} (100%) rename packages/sharing-editor/src/export/{html.test.ts => html.spec.ts} (100%) rename packages/sharing-editor/src/{path.test.ts => path.spec.ts} (100%) rename packages/sharing/src/{App.test.tsx => App.spec.tsx} (100%) diff --git a/packages/common/src/promise-delegate.test.ts b/packages/common/src/promise-delegate.spec.ts similarity index 100% rename from packages/common/src/promise-delegate.test.ts rename to packages/common/src/promise-delegate.spec.ts diff --git a/packages/common/src/requirements-txt.test.ts b/packages/common/src/requirements-txt.spec.ts similarity index 100% rename from packages/common/src/requirements-txt.test.ts rename to packages/common/src/requirements-txt.spec.ts diff --git a/packages/common/src/requirements.test.ts b/packages/common/src/requirements.spec.ts similarity index 100% rename from packages/common/src/requirements.test.ts rename to packages/common/src/requirements.spec.ts diff --git a/packages/desktop/bin-src/dump_artifacts/manifest.test.ts b/packages/desktop/bin-src/dump_artifacts/manifest.spec.ts similarity index 100% rename from packages/desktop/bin-src/dump_artifacts/manifest.test.ts rename to packages/desktop/bin-src/dump_artifacts/manifest.spec.ts diff --git a/packages/desktop/electron/ipc-utils.test.ts b/packages/desktop/electron/ipc-utils.spec.ts similarity index 100% rename from packages/desktop/electron/ipc-utils.test.ts rename to packages/desktop/electron/ipc-utils.spec.ts diff --git a/packages/desktop/electron/worker-options.test.ts b/packages/desktop/electron/worker-options.spec.ts similarity index 100% rename from packages/desktop/electron/worker-options.test.ts rename to packages/desktop/electron/worker-options.spec.ts diff --git a/packages/kernel/src/file.test.ts b/packages/kernel/src/file.spec.ts similarity index 100% rename from packages/kernel/src/file.test.ts rename to packages/kernel/src/file.spec.ts diff --git a/packages/kernel/src/module-auto-load.test.ts b/packages/kernel/src/module-auto-load.spec.ts similarity index 100% rename from packages/kernel/src/module-auto-load.test.ts rename to packages/kernel/src/module-auto-load.spec.ts diff --git a/packages/kernel/src/pyodide-loader.test.ts b/packages/kernel/src/pyodide-loader.spec.ts similarity index 100% rename from packages/kernel/src/pyodide-loader.test.ts rename to packages/kernel/src/pyodide-loader.spec.ts diff --git a/packages/kernel/src/react-helpers/CustomComponentIFrame/iframe-manipulation.test.ts b/packages/kernel/src/react-helpers/CustomComponentIFrame/iframe-manipulation.spec.ts similarity index 100% rename from packages/kernel/src/react-helpers/CustomComponentIFrame/iframe-manipulation.test.ts rename to packages/kernel/src/react-helpers/CustomComponentIFrame/iframe-manipulation.spec.ts diff --git a/packages/kernel/src/react-helpers/CustomComponentIFrame/index.test.tsx b/packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx similarity index 100% rename from packages/kernel/src/react-helpers/CustomComponentIFrame/index.test.tsx rename to packages/kernel/src/react-helpers/CustomComponentIFrame/index.spec.tsx diff --git a/packages/kernel/src/react-helpers/CustomComponentIFrame/url.test.ts b/packages/kernel/src/react-helpers/CustomComponentIFrame/url.spec.ts similarity index 100% rename from packages/kernel/src/react-helpers/CustomComponentIFrame/url.test.ts rename to packages/kernel/src/react-helpers/CustomComponentIFrame/url.spec.ts diff --git a/packages/kernel/src/react-helpers/download-button.test.ts b/packages/kernel/src/react-helpers/download-button.spec.ts similarity index 100% rename from packages/kernel/src/react-helpers/download-button.test.ts rename to packages/kernel/src/react-helpers/download-button.spec.ts diff --git a/packages/kernel/src/url.test.ts b/packages/kernel/src/url.spec.ts similarity index 100% rename from packages/kernel/src/url.test.ts rename to packages/kernel/src/url.spec.ts diff --git a/packages/mountable/src/options.test.ts b/packages/mountable/src/options.spec.ts similarity index 100% rename from packages/mountable/src/options.test.ts rename to packages/mountable/src/options.spec.ts diff --git a/packages/mountable/src/url.test.ts b/packages/mountable/src/url.spec.ts similarity index 100% rename from packages/mountable/src/url.test.ts rename to packages/mountable/src/url.spec.ts diff --git a/packages/sharing-common/src/buffer.test.ts b/packages/sharing-common/src/buffer.spec.ts similarity index 100% rename from packages/sharing-common/src/buffer.test.ts rename to packages/sharing-common/src/buffer.spec.ts diff --git a/packages/sharing-common/src/compress.test.ts b/packages/sharing-common/src/compress.spec.ts similarity index 100% rename from packages/sharing-common/src/compress.test.ts rename to packages/sharing-common/src/compress.spec.ts diff --git a/packages/sharing-common/src/url.test.ts b/packages/sharing-common/src/url.spec.ts similarity index 100% rename from packages/sharing-common/src/url.test.ts rename to packages/sharing-common/src/url.spec.ts diff --git a/packages/sharing-editor/src/export/html.test.ts b/packages/sharing-editor/src/export/html.spec.ts similarity index 100% rename from packages/sharing-editor/src/export/html.test.ts rename to packages/sharing-editor/src/export/html.spec.ts diff --git a/packages/sharing-editor/src/path.test.ts b/packages/sharing-editor/src/path.spec.ts similarity index 100% rename from packages/sharing-editor/src/path.test.ts rename to packages/sharing-editor/src/path.spec.ts diff --git a/packages/sharing/src/App.test.tsx b/packages/sharing/src/App.spec.tsx similarity index 100% rename from packages/sharing/src/App.test.tsx rename to packages/sharing/src/App.spec.tsx From a3384bd34f735ba23f1e1c95a2452f42fc051f52 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Tue, 25 Jun 2024 18:05:11 +0900 Subject: [PATCH 2/4] Fix tsconfig.json --- packages/common/tsconfig.json | 2 +- packages/kernel/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index 742ab9c6f..d967017d2 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -99,5 +99,5 @@ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "include": ["src"], - "exclude": ["./**/*.test.*"] + "exclude": ["./**/*.spec.*"] } diff --git a/packages/kernel/tsconfig.json b/packages/kernel/tsconfig.json index f299e7cdd..4c5378f71 100644 --- a/packages/kernel/tsconfig.json +++ b/packages/kernel/tsconfig.json @@ -98,5 +98,6 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "include": ["src", "../../streamlit/frontend/lib/src/**/*.d.ts"] + "include": ["src", "../../streamlit/frontend/lib/src/**/*.d.ts"], + "exclude": ["*.spec.*"] } From a1deb6321927a16690c208dae4547a0315aca7c3 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Tue, 25 Jun 2024 18:08:22 +0900 Subject: [PATCH 3/4] Fix --- .../desktop/electron/__tests__/{file.test.ts => file.spec.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/desktop/electron/__tests__/{file.test.ts => file.spec.ts} (100%) diff --git a/packages/desktop/electron/__tests__/file.test.ts b/packages/desktop/electron/__tests__/file.spec.ts similarity index 100% rename from packages/desktop/electron/__tests__/file.test.ts rename to packages/desktop/electron/__tests__/file.spec.ts From d02a318a59c79d8af6819438716690193143952b Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Tue, 25 Jun 2024 18:11:21 +0900 Subject: [PATCH 4/4] Remove sharing/src/App.spec.tsx --- packages/sharing/src/App.spec.tsx | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 packages/sharing/src/App.spec.tsx diff --git a/packages/sharing/src/App.spec.tsx b/packages/sharing/src/App.spec.tsx deleted file mode 100644 index d76787ed6..000000000 --- a/packages/sharing/src/App.spec.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import { render, screen } from "@testing-library/react"; -import App from "./App"; - -test("renders learn react link", () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -});