Skip to content

Commit 8b12ca0

Browse files
fix(test): use ES import instead of require() in terminal profile spec (Zoo-Code-Org#119)
1 parent 0f0c558 commit 8b12ca0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

webview-ui/src/components/settings/__tests__/TerminalSettings.profile.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// npx vitest run src/components/settings/__tests__/TerminalSettings.profile.spec.tsx
22

3+
import * as React from "react"
4+
35
import { render, screen, fireEvent, act } from "@/utils/test-utils"
46

57
import { TerminalSettings } from "../TerminalSettings"
@@ -51,7 +53,6 @@ vi.mock("@vscode/webview-ui-toolkit/react", () => ({
5153

5254
// Helper used by the Select mock to render SelectItem children as buttons.
5355
function renderSelectChildren(children: any, onValueChange: (value: string) => void): any {
54-
const React = require("react")
5556
return React.Children.map(children, (child: any) => {
5657
if (!child || typeof child !== "object") return child
5758
const itemValue = child.props?.value ?? child.props?.["data-item-value"]

0 commit comments

Comments
 (0)