Jack Mallers
7 years ago
9 changed files with 867 additions and 2 deletions
@ -0,0 +1,33 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers balanceReducer should handle DECREMENT_COUNTER 1`] = ` |
||||
|
Object { |
||||
|
"balanceLoading": false, |
||||
|
"channelBalance": undefined, |
||||
|
"walletBalance": undefined, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers balanceReducer should handle INCREMENT_COUNTER 1`] = ` |
||||
|
Object { |
||||
|
"balanceLoading": true, |
||||
|
"channelBalance": null, |
||||
|
"walletBalance": null, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers balanceReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"balanceLoading": false, |
||||
|
"channelBalance": null, |
||||
|
"walletBalance": null, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers balanceReducer should handle unknown action type 1`] = ` |
||||
|
Object { |
||||
|
"balanceLoading": false, |
||||
|
"channelBalance": null, |
||||
|
"walletBalance": null, |
||||
|
} |
||||
|
`; |
@ -0,0 +1,344 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers channelsReducer should correctly getChannels 1`] = ` |
||||
|
Object { |
||||
|
"channel": null, |
||||
|
"channelForm": Object { |
||||
|
"isOpen": false, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [], |
||||
|
"channelsLoading": true, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": false, |
||||
|
"pendingChannels": Object { |
||||
|
"pending_closing_channels": Array [], |
||||
|
"pending_force_closing_channels": Array [], |
||||
|
"pending_open_channels": Array [], |
||||
|
"total_limbo_balance": "", |
||||
|
}, |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers channelsReducer should correctly openingChannel 1`] = ` |
||||
|
Object { |
||||
|
"channel": null, |
||||
|
"channelForm": Object { |
||||
|
"isOpen": false, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [], |
||||
|
"channelsLoading": false, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": true, |
||||
|
"pendingChannels": Object { |
||||
|
"pending_closing_channels": Array [], |
||||
|
"pending_force_closing_channels": Array [], |
||||
|
"pending_open_channels": Array [], |
||||
|
"total_limbo_balance": "", |
||||
|
}, |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers channelsReducer should correctly receiveChannel 1`] = ` |
||||
|
Object { |
||||
|
"channel": null, |
||||
|
"channelForm": Object { |
||||
|
"isOpen": false, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [ |
||||
|
1, |
||||
|
2, |
||||
|
], |
||||
|
"channelsLoading": false, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": false, |
||||
|
"pendingChannels": Array [ |
||||
|
3, |
||||
|
4, |
||||
|
], |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers channelsReducer should correctly setChannel 1`] = ` |
||||
|
Object { |
||||
|
"channel": "channel", |
||||
|
"channelForm": Object { |
||||
|
"isOpen": false, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [], |
||||
|
"channelsLoading": false, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": false, |
||||
|
"pendingChannels": Object { |
||||
|
"pending_closing_channels": Array [], |
||||
|
"pending_force_closing_channels": Array [], |
||||
|
"pending_open_channels": Array [], |
||||
|
"total_limbo_balance": "", |
||||
|
}, |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers channelsReducer should correctly setChannelForm 1`] = ` |
||||
|
Object { |
||||
|
"channel": null, |
||||
|
"channelForm": Object { |
||||
|
"isOpen": true, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [], |
||||
|
"channelsLoading": false, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": false, |
||||
|
"pendingChannels": Object { |
||||
|
"pending_closing_channels": Array [], |
||||
|
"pending_force_closing_channels": Array [], |
||||
|
"pending_open_channels": Array [], |
||||
|
"total_limbo_balance": "", |
||||
|
}, |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers channelsReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"channel": null, |
||||
|
"channelForm": Object { |
||||
|
"isOpen": false, |
||||
|
"local_amt": "", |
||||
|
"node_key": "", |
||||
|
"push_amt": "", |
||||
|
}, |
||||
|
"channels": Array [], |
||||
|
"channelsLoading": false, |
||||
|
"closingChannel": false, |
||||
|
"closingChannelIds": Array [], |
||||
|
"contactModal": Object { |
||||
|
"channel": null, |
||||
|
"isOpen": false, |
||||
|
}, |
||||
|
"filter": Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
"filterPulldown": false, |
||||
|
"filters": Array [ |
||||
|
Object { |
||||
|
"key": "ALL_CHANNELS", |
||||
|
"name": "All Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "ACTIVE_CHANNELS", |
||||
|
"name": "Online Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "NON_ACTIVE_CHANNELS", |
||||
|
"name": "Offline Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "OPEN_PENDING_CHANNELS", |
||||
|
"name": "Pending Contacts", |
||||
|
}, |
||||
|
Object { |
||||
|
"key": "CLOSING_PENDING_CHANNELS", |
||||
|
"name": "Closing Contacts", |
||||
|
}, |
||||
|
], |
||||
|
"loadingChannelPubkeys": Array [], |
||||
|
"openingChannel": false, |
||||
|
"pendingChannels": Object { |
||||
|
"pending_closing_channels": Array [], |
||||
|
"pending_force_closing_channels": Array [], |
||||
|
"pending_open_channels": Array [], |
||||
|
"total_limbo_balance": "", |
||||
|
}, |
||||
|
"searchQuery": "", |
||||
|
"viewType": 0, |
||||
|
} |
||||
|
`; |
@ -0,0 +1,13 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers formReducer should correctly setFormType 1`] = ` |
||||
|
Object { |
||||
|
"formType": "FOO", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers formReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"formType": null, |
||||
|
} |
||||
|
`; |
@ -0,0 +1,22 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers infoReducer should correctly getInfo 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"infoLoading": true, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers infoReducer should correctly receiveInfo 1`] = ` |
||||
|
Object { |
||||
|
"data": "foo", |
||||
|
"infoLoading": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers infoReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"infoLoading": false, |
||||
|
} |
||||
|
`; |
@ -0,0 +1,171 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly getInvoice 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": true, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly getInvoices 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": true, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly invcoiceFailed 1`] = ` |
||||
|
Object { |
||||
|
"data": null, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly invcoiceSuccessful 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [ |
||||
|
"foo", |
||||
|
], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly receiveFormInvoice 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly receiveInvoice 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": "foo", |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly receiveInvoices 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [ |
||||
|
1, |
||||
|
2, |
||||
|
], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly searchInvoices 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "foo", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly sendInvoice 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": true, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should correctly setInvoice 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": "foo", |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers invoiceReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"data": Object {}, |
||||
|
"formInvoice": Object { |
||||
|
"amount": "0", |
||||
|
"payreq": "", |
||||
|
"r_hash": "", |
||||
|
}, |
||||
|
"invoice": null, |
||||
|
"invoiceLoading": false, |
||||
|
"invoices": Array [], |
||||
|
"invoicesSearchText": "", |
||||
|
} |
||||
|
`; |
@ -0,0 +1,49 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers paymentReducer should correctly getPayments 1`] = ` |
||||
|
Object { |
||||
|
"payment": null, |
||||
|
"paymentLoading": true, |
||||
|
"payments": Array [], |
||||
|
"sendingPayment": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers paymentReducer should correctly paymentSuccessful 1`] = ` |
||||
|
Object { |
||||
|
"payment": null, |
||||
|
"paymentLoading": false, |
||||
|
"payments": Array [], |
||||
|
"sendingPayment": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers paymentReducer should correctly receivePayments 1`] = ` |
||||
|
Object { |
||||
|
"payment": null, |
||||
|
"paymentLoading": false, |
||||
|
"payments": Array [ |
||||
|
1, |
||||
|
2, |
||||
|
], |
||||
|
"sendingPayment": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers paymentReducer should correctly sendPayment 1`] = ` |
||||
|
Object { |
||||
|
"payment": "foo", |
||||
|
"paymentLoading": false, |
||||
|
"payments": Array [], |
||||
|
"sendingPayment": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers paymentReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"payment": null, |
||||
|
"paymentLoading": false, |
||||
|
"payments": Array [], |
||||
|
"sendingPayment": false, |
||||
|
} |
||||
|
`; |
@ -0,0 +1,182 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly connectFailure 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly connectPeer 1`] = ` |
||||
|
Object { |
||||
|
"connecting": true, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly connectSuccess 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [ |
||||
|
"foo", |
||||
|
], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly disconnectFailure 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly disconnectPeer 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": true, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly disconnectSuccess 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly getPeers 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": true, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly receivePeers 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": "foo", |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly setPeer 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": "foo", |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should correctly setPeerForm 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"0": "f", |
||||
|
"1": "o", |
||||
|
"2": "o", |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers peersReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"connecting": false, |
||||
|
"disconnecting": false, |
||||
|
"peer": null, |
||||
|
"peerForm": Object { |
||||
|
"host": "", |
||||
|
"isOpen": false, |
||||
|
"pubkey": "", |
||||
|
}, |
||||
|
"peers": Array [], |
||||
|
"peersLoading": false, |
||||
|
"searchQuery": "", |
||||
|
} |
||||
|
`; |
@ -0,0 +1,51 @@ |
|||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
|
||||
|
exports[`reducers tickerReducer should correctly getTicker 1`] = ` |
||||
|
Object { |
||||
|
"btcTicker": null, |
||||
|
"crypto": "", |
||||
|
"currency": "", |
||||
|
"ltcTicker": null, |
||||
|
"tickerLoading": true, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers tickerReducer should correctly receiveTicker 1`] = ` |
||||
|
Object { |
||||
|
"btcTicker": undefined, |
||||
|
"crypto": "", |
||||
|
"currency": "", |
||||
|
"ltcTicker": undefined, |
||||
|
"tickerLoading": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers tickerReducer should correctly setCrypto 1`] = ` |
||||
|
Object { |
||||
|
"btcTicker": null, |
||||
|
"crypto": "foo", |
||||
|
"currency": "", |
||||
|
"ltcTicker": null, |
||||
|
"tickerLoading": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers tickerReducer should correctly setCurrency 1`] = ` |
||||
|
Object { |
||||
|
"btcTicker": null, |
||||
|
"crypto": "", |
||||
|
"currency": "foo", |
||||
|
"ltcTicker": null, |
||||
|
"tickerLoading": false, |
||||
|
} |
||||
|
`; |
||||
|
|
||||
|
exports[`reducers tickerReducer should handle initial state 1`] = ` |
||||
|
Object { |
||||
|
"btcTicker": null, |
||||
|
"crypto": "", |
||||
|
"currency": "", |
||||
|
"ltcTicker": null, |
||||
|
"tickerLoading": false, |
||||
|
} |
||||
|
`; |
Loading…
Reference in new issue