/
index.js
62 lines (59 loc) · 1.04 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/** @format */
/**
* External dependencies
*/
import { shallow } from 'enzyme';
/**
* Internal dependencies
*/
import { TransactionsList } from '../';
describe( 'Transactions list', () => {
test( 'renders correctly', () => {
const transactions = {
data: [
{
created: 1572590800,
type: 'refund',
source: {
object: 'refund',
},
amount: 1000,
fee: 50,
// available_on: 1573199200,
},
{
created: 1572580800,
type: 'charge',
source: {
object: 'charge',
payment_method_details: {
card: {
brand: 'visa',
},
},
billing_details: {
name: 'My name',
email: 'a@b.com',
address: {
country: 'US',
},
},
outcome: {
risk_level: 'normal',
},
},
amount: 1500,
fee: 50,
// available_on: 1573189200,
},
],
};
const list = shallow(
<TransactionsList
transactions={ transactions }
isLoading={ false }
/>
);
expect( list ).toMatchSnapshot();
} );
} );