-
-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix test for components with svg files
Co-authored-by: Justice Otuya <[email protected]>
- Loading branch information
1 parent
adcaa5e
commit c9a063f
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React, { SVGProps } from 'react'; | ||
|
||
const SvgrMock = React.forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>( | ||
(props, ref) => <svg ref={ref} {...props} /> | ||
); | ||
|
||
export const ReactComponent = SvgrMock; | ||
export default SvgrMock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// !STARTERCONF You should delete this page | ||
|
||
import { render, screen } from '@testing-library/react'; | ||
|
||
import HomePage from '@/app/page'; | ||
|
||
describe('Homepage', () => { | ||
it('renders the Components', () => { | ||
render(<HomePage />); | ||
|
||
const heading = screen.getByText(/A starter for Next.js/i); | ||
|
||
expect(heading).toBeInTheDocument(); | ||
}); | ||
}); |
c9a063f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ts-nextjs-tailwind-starter – ./
ts-nextjs-tailwind-starter.vercel.app
ts-nextjs-tailwind-starter-git-main-theodorusclarence.vercel.app
ts-nextjs-tailwind-starter-theodorusclarence.vercel.app
tsnext-tw.thcl.dev
ts-nextjs-tailwind-starter.theodorusclarence.com