File tree 2 files changed +51
-27
lines changed
2 files changed +51
-27
lines changed Original file line number Diff line number Diff line change 1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
- exports [` should render the landing page correctly 1` ] = `
4
- <div >
5
- <div
6
- className = " row"
7
- >
8
- <h1 >
9
- BareFoot Nomad Welcomes You!!
10
- </h1 >
11
- <a
12
- className = " waves-effect waves-light btn"
13
- href = " /login"
14
- >
15
- Login
16
- </a >
17
- <a
18
- className = " waves-effect waves-light btn"
19
- href = " /signup"
20
- >
21
- Signup
22
- </a >
23
- </div >
24
- </div >
3
+ exports [` *************** Testing the Home component *************** Should render the Home page correctly 1` ] = `
4
+ <Provider
5
+ store = {
6
+ Object {
7
+ " dispatch" : [Function ],
8
+ " getState" : [Function ],
9
+ " replaceReducer" : [Function ],
10
+ " subscribe" : [Function ],
11
+ Symbol(Symbol .observable ): [Function ],
12
+ }
13
+ }
14
+ >
15
+ <Home >
16
+ <div >
17
+ <div
18
+ className = " row"
19
+ >
20
+ <h1 >
21
+ BareFoot Nomad Welcomes You!!
22
+ </h1 >
23
+ <a
24
+ className = " waves-effect waves-light btn"
25
+ href = " /login"
26
+ >
27
+ Login
28
+ </a >
29
+ <a
30
+ className = " waves-effect waves-light btn"
31
+ href = " /signup"
32
+ >
33
+ Signup
34
+ </a >
35
+ </div >
36
+ </div >
37
+ </Home >
38
+ </Provider >
25
39
` ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { shallow } from 'enzyme' ;
2
+ import { mount } from 'enzyme' ;
3
+ import { Provider } from 'react-redux' ;
3
4
import Home from '../../components/home' ;
5
+ import configureStore from '../../redux/configureStore' ;
4
6
5
- test ( 'should render the landing page correctly' , ( ) => {
6
- const wrapper = shallow ( < Home /> )
7
- expect ( wrapper ) . toMatchSnapshot ( ) ;
8
- } )
7
+ describe ( '*************** Testing the Home component ***************' , ( ) => {
8
+ const store = configureStore ( ) ;
9
+
10
+ it ( 'Should render the Home page correctly' , ( ) => {
11
+ const wrapper = mount (
12
+ < Provider store = { store } >
13
+ < Home />
14
+ </ Provider >
15
+ ) ;
16
+ expect ( wrapper ) . toMatchSnapshot ( ) ;
17
+ } ) ;
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments