-
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.
feat: tested my test environment configuration by adding snapshot test
- Loading branch information
Showing
30 changed files
with
248 additions
and
6 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": ["next/babel"] | ||
} |
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 @@ | ||
const Adapter = require('enzyme-adapter-react-16'); | ||
|
||
require('enzyme').configure({adapter: new Adapter()}); |
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,7 @@ | ||
module.exports = { | ||
setupFilesAfterEnv: ['./enzyme.js'], | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js', | ||
'\\.(css|less)$': '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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,18 @@ | ||
import styles from './styles.module.css'; | ||
import PropTypes from 'prop-types'; | ||
|
||
|
||
export const Layout = ({children}) => { | ||
return ( | ||
<div className={styles.contain}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
Layout.propTypes = { | ||
children: PropTypes.oneOfType([ | ||
PropTypes.object, | ||
PropTypes.func | ||
]), | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/components/Layout/__tests__/__snapshots__/layout.spec.js.snap
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`layout Component matches the navbar snapshots 1`] = ` | ||
<div | ||
className="contain" | ||
/> | ||
`; |
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,14 @@ | ||
import React from 'react'; | ||
import Layout from '../'; | ||
import renderer from 'react-test-renderer'; | ||
import {describe, it} from '@jest/globals'; | ||
|
||
describe('layout Component', () => { | ||
|
||
it('matches the navbar snapshots', () => { | ||
const tree = renderer.create( | ||
<Layout/> | ||
).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
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,4 @@ | ||
import {Layout} from './Layout'; | ||
|
||
|
||
export default Layout; |
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,4 @@ | ||
.contain{ | ||
max-width: 80rem; | ||
@apply m-auto | ||
} |
Empty file.
Empty file.
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 |
---|---|---|
@@ -1,5 +1,154 @@ | ||
/* purgecss start ignore */ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind base; | ||
@tailwind components; | ||
/* purgecss end ignore */ | ||
@tailwind utilities; | ||
@tailwind utilities; | ||
|
||
|
||
@layer base { | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-thinitalic-webfont.ttf') format('truetype'); | ||
font-weight: 100; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-thin-webfont.ttf') format('truetype'); | ||
font-weight: 100; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-extrathinitalic-webfont.ttf') format('truetype'); | ||
font-weight: 200; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-extrathin-webfont.ttf') format('truetype'); | ||
font-weight: 200; | ||
font-style: normal; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-lightitalic-webfont.ttf') format('truetype'); | ||
font-weight: 300; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-light-webfont.ttf') format('truetype'); | ||
font-weight: 300; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-regularitalic-webfont.ttf') format('truetype'); | ||
font-weight: 400; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-regular-webfont.ttf') format('truetype'); | ||
font-weight: 400; | ||
font-style: normal; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-semibolditalic-webfont.ttf') format('truetype'); | ||
font-weight: 600; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
|
||
src: url('/fonts/averta-semibold-webfont.eot'); | ||
src: url('/fonts/averta-semibold-webfont.eot?#iefix') format('embedded-opentype'), | ||
url('/fonts/averta-semibold-webfont.woff') format('woff'), | ||
url('/fonts/averta-semibold-webfont.ttf') format('truetype'), | ||
url('/fonts/averta-semibold-webfont.svg#avertasemibold') format('svg'); | ||
font-weight: 600; | ||
font-style: normal; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-bolditalic-webfont.ttf') format('truetype'); | ||
font-weight: 700; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-bold-webfont.eot'); | ||
src: url('/fonts/averta-bold-webfont.eot?#iefix') format('embedded-opentype'), | ||
url('/fonts/averta-bold-webfont.woff') format('woff'), | ||
url('/fonts/averta-bold-webfont.ttf') format('truetype'), | ||
url('/fonts/averta-bold-webfont.svg#avertabold') format('svg'); | ||
font-weight: 700; | ||
font-style: normal; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-extrabolditalic-webfont.ttf') format('truetype'); | ||
font-weight: 800; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-extrabold-webfont.ttf') format('truetype'); | ||
font-weight: 800; | ||
font-style: normal; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-blackitalic-webfont.ttf') format('truetype'); | ||
font-weight: 900; | ||
font-style: italic; | ||
|
||
} | ||
|
||
@font-face { | ||
font-family: 'averta'; | ||
src: url('/fonts/averta-black-webfont.ttf') format('truetype'); | ||
font-weight: 900; | ||
font-style: normal; | ||
|
||
} | ||
} | ||
|
||
p { | ||
@apply m-0 ; | ||
} | ||
|
||
body { | ||
@apply m-0 overflow-x-hidden bg-night; | ||
} | ||
|
||
* { | ||
@apply font-sans font-normal text-base text-white; | ||
} |
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