-
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
33 changed files
with
2,135 additions
and
39 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,5 @@ | ||
module.exports = { | ||
preset: 'jest-preset-gatsby/typescript', | ||
snapshotSerializers: ['enzyme-to-json/serializer'], | ||
setupFilesAfterEnv: ['<rootDir>/setupEnzyme.js'], | ||
}; |
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,4 @@ | ||
import { configure } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
configure({ adapter: new Adapter() }); |
7 changes: 7 additions & 0 deletions
7
src/components/atoms/Button/__snapshots__/index.spec.tsx.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[`Button snapshot 1`] = ` | ||
<styled.button> | ||
... | ||
</styled.button> | ||
`; |
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 * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import Button from '.'; | ||
|
||
describe('Button', () => { | ||
it('snapshot', () => { | ||
const tree = shallow(<Button>...</Button>); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
7 changes: 7 additions & 0 deletions
7
src/components/atoms/Container/__snapshots__/index.spec.tsx.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[`Container snapshot 1`] = ` | ||
<styled.section> | ||
... | ||
</styled.section> | ||
`; |
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 * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import Container from '.'; | ||
|
||
describe('Container', () => { | ||
it('snapshot', () => { | ||
const tree = shallow(<Container>...</Container>); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
63 changes: 63 additions & 0 deletions
63
src/components/atoms/Input/__snapshots__/index.spec.tsx.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,63 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Input snapshot 1`] = ` | ||
<StyledComponent | ||
forwardedComponent={ | ||
Object { | ||
"$$typeof": Symbol(react.forward_ref), | ||
"attrs": Array [], | ||
"componentStyle": ComponentStyle { | ||
"componentId": "sc-bdVaJa", | ||
"isStatic": false, | ||
"rules": Array [ | ||
" | ||
", | ||
" | ||
width: 100%; | ||
font-size: ", | ||
[Function], | ||
"; | ||
color: ", | ||
[Function], | ||
"; | ||
background: transparent; | ||
outline: none; | ||
box-shadow: none; | ||
padding: 0 ", | ||
[Function], | ||
"; | ||
border-top: 0; | ||
border-left: 0; | ||
border-right: 0; | ||
border-bottom: 1px solid ", | ||
[Function], | ||
"; | ||
transition: background, border-bottom 0.2s; | ||
&:focus { | ||
border-bottom: 1px solid ", | ||
[Function], | ||
"; | ||
background: rgba(61, 16, 107, 0.15); | ||
} | ||
", | ||
" | ||
height: 40px; | ||
", | ||
], | ||
}, | ||
"displayName": "styled.input", | ||
"foldedComponentIds": Array [], | ||
"render": [Function], | ||
"styledComponentId": "sc-bdVaJa", | ||
"target": "input", | ||
"toString": [Function], | ||
"usesTheme": true, | ||
"warnTooManyClasses": [Function], | ||
"withComponent": [Function], | ||
} | ||
} | ||
forwardedRef={null} | ||
/> | ||
`; |
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 * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import Input from '.'; | ||
|
||
describe('Input', () => { | ||
it('snapshot', () => { | ||
const tree = shallow(<Input />); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
42 changes: 42 additions & 0 deletions
42
src/components/atoms/Lists/__snapshots__/index.spec.tsx.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,42 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`List snapshot 1`] = ` | ||
<styled.ul | ||
items={ | ||
Array [ | ||
Object { | ||
"linkUrl": "https://blivesta.com", | ||
"title": "foo", | ||
}, | ||
Object { | ||
"title": "bar", | ||
}, | ||
Object { | ||
"title": "baz", | ||
}, | ||
] | ||
} | ||
> | ||
<styled.li | ||
key="0" | ||
> | ||
<styled.a | ||
href="https://blivesta.com" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
foo | ||
</styled.a> | ||
</styled.li> | ||
<styled.li | ||
key="1" | ||
> | ||
bar | ||
</styled.li> | ||
<styled.li | ||
key="2" | ||
> | ||
baz | ||
</styled.li> | ||
</styled.ul> | ||
`; |
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,26 @@ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import List from '.'; | ||
|
||
describe('List', () => { | ||
it('snapshot', () => { | ||
const tree = shallow( | ||
<List | ||
items={[ | ||
{ | ||
title: 'foo', | ||
linkUrl: 'https://blivesta.com', | ||
}, | ||
{ | ||
title: 'bar', | ||
}, | ||
{ | ||
title: 'baz', | ||
}, | ||
]} | ||
/>, | ||
); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/components/atoms/Logo/__snapshots__/index.spec.tsx.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,15 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Logo snapshot 1`] = ` | ||
<svg | ||
viewBox="0 0 512 512" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<styled.path | ||
d="M0 0h512v512H0z" | ||
/> | ||
<styled.path | ||
d="M280.448 0L152.545 127.712 280.48 255.424 152 383.712 280.448 512H512V0H280.448zm119.568 440L336 376l64.016-64L464 376l-63.984 64zm0-240L336 136l64.016-64L464 136l-63.984 64z" | ||
/> | ||
</svg> | ||
`; |
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 * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import Logo from '.'; | ||
|
||
describe('Logo', () => { | ||
it('snapshot', () => { | ||
const tree = shallow(<Logo />); | ||
expect(toJson(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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`P snapshot 1`] = ` | ||
<styled.p> | ||
この文章はダミーです。文字の大きさ、量、字間、行間等を確認するために入れています。この文章はダミーです。 | ||
</styled.p> | ||
`; |
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,13 @@ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import P from '.'; | ||
|
||
describe('P', () => { | ||
it('snapshot', () => { | ||
const tree = shallow( | ||
<P>この文章はダミーです。文字の大きさ、量、字間、行間等を確認するために入れています。この文章はダミーです。</P>, | ||
); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
43 changes: 43 additions & 0 deletions
43
src/components/atoms/SubTitle/__snapshots__/index.spec.tsx.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,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`SubTitle snapshot 1`] = ` | ||
<StyledComponent | ||
forwardedComponent={ | ||
Object { | ||
"$$typeof": Symbol(react.forward_ref), | ||
"attrs": Array [], | ||
"componentStyle": ComponentStyle { | ||
"componentId": "sc-bdVaJa", | ||
"isStatic": false, | ||
"rules": Array [ | ||
" | ||
font-family: ", | ||
[Function], | ||
"; | ||
font-size: ", | ||
[Function], | ||
"; | ||
text-transform: uppercase; | ||
line-height: 1; | ||
margin-top: 0; | ||
letter-spacing: 0.15em; | ||
text-indent: 0.15em; | ||
", | ||
], | ||
}, | ||
"displayName": "styled.h3", | ||
"foldedComponentIds": Array [], | ||
"render": [Function], | ||
"styledComponentId": "sc-bdVaJa", | ||
"target": "h3", | ||
"toString": [Function], | ||
"usesTheme": true, | ||
"warnTooManyClasses": [Function], | ||
"withComponent": [Function], | ||
} | ||
} | ||
forwardedRef={null} | ||
> | ||
... | ||
</StyledComponent> | ||
`; |
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 * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import SubTitle from '.'; | ||
|
||
describe('SubTitle', () => { | ||
it('snapshot', () => { | ||
const tree = shallow(<SubTitle>...</SubTitle>); | ||
expect(toJson(tree)).toMatchSnapshot(); | ||
}); | ||
}); |
Oops, something went wrong.