-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
2,390 additions
and
199 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 |
---|---|---|
|
@@ -25,6 +25,7 @@ npm-debug.log* | |
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
.yarn | ||
|
||
# local env files | ||
.env*.local | ||
|
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,20 @@ | ||
import { render } from '@testing-library/react'; | ||
import { LinesCardContent } from '../CardContent/CardContent'; | ||
import { LineObject } from '../lineType'; | ||
|
||
describe('CardContent', () => { | ||
it('should render correctly', async () => { | ||
const { getByText } = render( | ||
<LinesCardContent | ||
placemark={ | ||
{ | ||
geometry: [0, 0], | ||
properties: { title: 'title' }, | ||
} as unknown as LineObject | ||
} | ||
/>, | ||
); | ||
|
||
expect(getByText('title')).toBeInTheDocument(); | ||
}); | ||
}); |
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,22 @@ | ||
import nextJest from 'next/jest.js'; | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './', | ||
}); | ||
|
||
// Add any custom config to be passed to Jest | ||
/** @type {import('jest').Config} */ | ||
const config = { | ||
// Add more setup options before each test is run | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
|
||
testEnvironment: 'jest-environment-jsdom', | ||
|
||
modulePaths: ['<rootDir>/'], | ||
|
||
prettierPath: null, | ||
}; | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
export default createJestConfig(config); |
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 @@ | ||
import '@testing-library/jest-dom'; |
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
Oops, something went wrong.