Skip to content

Commit aa4679c

Browse files
committed
fix: use ...testingLibrary.configs["flat/react"] insetad of ...testingLibrary.configs["flat/dom"]
1 parent 21afcd5 commit aa4679c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ export default tseslint.config(
2828
},
2929
{
3030
files: ["src/components/**/*.test.[jt]s?(x)"],
31-
...testingLibrary.configs["flat/dom"],
31+
...testingLibrary.configs["flat/react"],
3232
},
3333
);

src/components/Icon/Icon.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { Basic } = composeStories(stories);
88
test("SVG 요소를 렌더링한다", () => {
99
const { container } = render(<Basic />);
1010

11-
// eslint-disable-next-line testing-library/no-node-access
11+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
1212
expect(container.querySelector("svg")).toBeInTheDocument();
1313
});
1414

@@ -21,7 +21,7 @@ test.each([
2121
] as const)("%s 크기에 올바른 클래스를 적용한다", (size, className) => {
2222
const { container } = render(<Basic size={size} />);
2323

24-
// eslint-disable-next-line testing-library/no-node-access
24+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
2525
expect(container.querySelector("svg")).toHaveClass(className);
2626
});
2727

@@ -35,7 +35,7 @@ test.each([
3535
] as const)("%s 톤에 올바른 색상 클래스를 적용한다", (tone, className) => {
3636
const { container } = render(<Basic tone={tone} muted={false} />);
3737

38-
// eslint-disable-next-line testing-library/no-node-access
38+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
3939
expect(container.querySelector("svg")).toHaveClass(className);
4040
});
4141

@@ -45,7 +45,7 @@ test.each([
4545
] as const)("muted가 %s일 때 올바른 클래스를 적용한다", (muted, className) => {
4646
const { container } = render(<Basic tone="neutral" muted={muted} />);
4747

48-
// eslint-disable-next-line testing-library/no-node-access
48+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
4949
expect(container.querySelector("svg")).toHaveClass(className);
5050
});
5151

@@ -66,7 +66,7 @@ test.each([
6666
"%s 톤과 muted=%s 조합으로 SVG 요소를 렌더링한다",
6767
(tone, muted) => {
6868
const { container } = render(<Basic tone={tone} muted={muted} />);
69-
// eslint-disable-next-line testing-library/no-node-access
69+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
7070
const svg = container.querySelector("svg");
7171

7272
expect(svg).toBeInTheDocument();
@@ -88,7 +88,7 @@ test.each([
8888
["info", true],
8989
] as const)("%s 톤과 muted=%s 조합으로 class 속성을 가진다", (tone, muted) => {
9090
const { container } = render(<Basic tone={tone} muted={muted} />);
91-
// eslint-disable-next-line testing-library/no-node-access
91+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
9292
const svg = container.querySelector("svg");
9393

9494
expect(svg).toHaveAttribute("class");
@@ -111,7 +111,7 @@ test.each([
111111
"%s 톤과 muted=%s 조합으로 색상 클래스를 포함한다",
112112
(tone, muted) => {
113113
const { container } = render(<Basic tone={tone} muted={muted} />);
114-
// eslint-disable-next-line testing-library/no-node-access
114+
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
115115
const svg = container.querySelector("svg");
116116

117117
const hasColorClass = Array.from(svg?.classList || []).some(

0 commit comments

Comments
 (0)