forked from yTakkar/React-Instagram-Clone-2.0
-
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.
Renamed jest config files to more understandable names
- Loading branch information
Showing
5 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// import jest-extended | ||
import 'jest-extended' | ||
import { configure } from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16' | ||
|
||
// set timeout (jest default=5000ms) | ||
jest.setTimeout(30000) | ||
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,5 @@ | ||
// import jest-extended | ||
import 'jest-extended' | ||
|
||
// set timeout (jest default=5000ms) | ||
jest.setTimeout(30000) |
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,31 +1,31 @@ | ||
import React from 'react' | ||
import { create } from 'react-test-renderer' | ||
import AppLink from '../link' | ||
import { BrowserRouter as Router } from 'react-router-dom' | ||
|
||
describe('AppLink Component', () => { | ||
|
||
it('should match snapshot with label as a string', () => { | ||
const tree = create( | ||
<Router> | ||
<AppLink | ||
to='/' | ||
label='Home' | ||
/> | ||
</Router> | ||
).toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('should match snapshot with children prop', () => { | ||
const tree = create( | ||
<Router> | ||
<AppLink to='/' > | ||
<img src='/images/spacecraft.jpg' /> | ||
</AppLink> | ||
</Router> | ||
).toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
}) | ||
import React from 'react' | ||
import { create } from 'react-test-renderer' | ||
import AppLink from '../link' | ||
import { BrowserRouter as Router } from 'react-router-dom' | ||
|
||
describe('AppLink Component', () => { | ||
|
||
it('should match snapshot with label as a string', () => { | ||
const tree = create( | ||
<Router> | ||
<AppLink | ||
to='/' | ||
label='Home' | ||
/> | ||
</Router> | ||
).toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('should match snapshot with children prop', () => { | ||
const tree = create( | ||
<Router> | ||
<AppLink to='/' > | ||
<img src='/images/spacecraft.jpg' /> | ||
</AppLink> | ||
</Router> | ||
).toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
}) |