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
6beb830
commit 0646ae9
Showing
5 changed files
with
327 additions
and
105 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": ["es2015", "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,4 @@ | ||
const enzyme = require('enzyme'); | ||
const Adapter = require('enzyme-adapter-react-16'); | ||
|
||
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
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,21 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import BlogItem from './blogItem' | ||
|
||
describe('Layout component', () => { | ||
const mockProps = { | ||
pathContext: { | ||
data: { | ||
title: "mock title", | ||
content: "mock content", | ||
href: "google.com", | ||
}, | ||
}, | ||
} | ||
|
||
it('should render', () => { | ||
const wrapper = shallow(<BlogItem {...mockProps} />) | ||
|
||
expect(wrapper) | ||
}) | ||
}) |
Oops, something went wrong.