-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19bdb6d
commit c3b7de9
Showing
6 changed files
with
1,140 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
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,10 @@ | ||
module.exports = { | ||
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'], | ||
transform: { | ||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest', | ||
}, | ||
testEnvironment: 'jsdom', | ||
moduleNameMapper: { | ||
'\\.css$': 'identity-obj-proxy', | ||
}, | ||
}; |
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,11 @@ | ||
import React from 'react'; | ||
|
||
const Index = () => { | ||
return ( | ||
<div> | ||
<h1>Hello, World!</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Index; |
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,11 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import Index from './Index'; | ||
|
||
test('renders hello message', () => { | ||
const { getByText } = render(<Index />); // 컴포넌트 렌더링 | ||
|
||
// 렌더링된 컴포넌트에서 "Hello, World!" 텍스트를 찾아서 확인 | ||
const helloMessage = getByText(/Hello, World!/i); | ||
expect(helloMessage).toBeInTheDocument(); | ||
}); |
Oops, something went wrong.