diff --git a/.storybook/main.js b/.storybook/main.js index fdad856..fc780b1 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -7,6 +7,7 @@ module.exports = { '../components/**/*.stories.mdx', '../components/**/*.stories.@(js|jsx|ts|tsx)', ], + "staticDirs": ["../public"], "addons": [ "@storybook/addon-links", "@storybook/addon-essentials", diff --git a/README.md b/README.md index 436bf98..46478c6 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,7 @@ ### Aliases, Fonts and Global styles [pull request](https://github.com/nickovchinnikov/coursesbox/pull/6) + +### Aliases and themes for Jest + +[pull request](https://github.com/nickovchinnikov/coursesbox/pull/7) diff --git a/components/Button/Button.test.tsx b/components/Button/Button.test.tsx index 09efd46..64eb191 100644 --- a/components/Button/Button.test.tsx +++ b/components/Button/Button.test.tsx @@ -1,7 +1,8 @@ import React from "react"; -import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; +import { render, screen } from "@/test-utils"; + import { Button } from "./Button"; describe("Button test cases", () => { diff --git a/components/Button/__snapshots__/Button.test.tsx.snap b/components/Button/__snapshots__/Button.test.tsx.snap index 0186d5b..7f63928 100644 --- a/components/Button/__snapshots__/Button.test.tsx.snap +++ b/components/Button/__snapshots__/Button.test.tsx.snap @@ -3,7 +3,7 @@ exports[`Button test cases Render check 1`] = `