1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

Make tests more readable

This commit is contained in:
Vladimir Volek 2018-10-02 20:26:24 +02:00 committed by Szymon Lesisz
parent 802e8f8e32
commit 583a0f2cf6
2 changed files with 39 additions and 21 deletions

View File

@ -39,3 +39,9 @@ exports[`reducers utils observeChanges shoul NOT be the same - returns true 8`]
exports[`reducers utils observeChanges shoul NOT be the same - returns true 9`] = `true`; exports[`reducers utils observeChanges shoul NOT be the same - returns true 9`] = `true`;
exports[`reducers utils observeChanges shoul NOT be the same - returns true 10`] = `true`; exports[`reducers utils observeChanges shoul NOT be the same - returns true 10`] = `true`;
exports[`reducers utils observeChanges shoul NOT be the same - returns true 11`] = `true`;
exports[`reducers utils observeChanges shoul NOT be the same - returns true 12`] = `true`;
exports[`reducers utils observeChanges shoul NOT be the same - returns true 13`] = `true`;

View File

@ -25,24 +25,24 @@ describe('reducers utils', () => {
current: 'a', current: 'a',
}, },
{ {
pervious: { test: 1 }, pervious: { one: 1 },
current: { test: 1 }, current: { one: 1 },
}, },
{ {
pervious: { test: { test: 1 } }, pervious: { one: { two: 1 } },
current: { test: { test: 1 } }, current: { one: { two: 1 } },
}, },
{ {
pervious: { test: { test: [1, 2, 3] } }, pervious: { one: { two: [1, 2, 3] } },
current: { test: { test: [1, 2, 3] } }, current: { one: { two: [1, 2, 3] } },
}, },
{ {
pervious: { test: { test: [1, { test: 1 }, 3] } }, pervious: { one: { two: [1, { three: 1 }, 3] } },
current: { test: { test: [1, { test: 1 }, 3] } }, current: { one: { two: [1, { three: 1 }, 3] } },
}, },
{ {
pervious: { test: { test: [1, { test: 1 }, { test: 3, test1: { test: 3 } }] } }, pervious: { one: { two: [1, { three: 1 }, { four: 3, five: { six: 3 } }] } },
current: { test: { test: [1, { test: 1 }, { test: 3, test1: { test: 3 } }] } }, current: { one: { two: [1, { three: 1 }, { four: 3, five: { six: 3 } }] } },
}, },
]; ];
@ -57,9 +57,13 @@ describe('reducers utils', () => {
const data = [ const data = [
// example of different data (true) // example of different data (true)
{ {
pervious: { test: 1 }, pervious: { one: 1 },
current: {}, current: {},
}, },
{
pervious: { one: 1 },
current: { one: 1, two: 2 },
},
{ {
pervious: [{}, {}], pervious: [{}, {}],
current: [], current: [],
@ -77,24 +81,32 @@ describe('reducers utils', () => {
current: '1', current: '1',
}, },
{ {
pervious: { test: 1 }, pervious: { one: 1 },
current: { test: 2 }, current: { one: 2 },
}, },
{ {
pervious: { test: { test: 1 } }, pervious: { one: { two: 1 } },
current: { test: { test: 2 } }, current: { one: { two: 2 } },
}, },
{ {
pervious: { test: { test: [1, 2, 3] } }, pervious: { one: { two: 1 } },
current: { test: { test: [1, 1, 3] } }, current: { one: { two: 2 } },
}, },
{ {
pervious: { test: { test: [1, { test: 1 }, 3] } }, pervious: { one: { two: [1, 2, 3] } },
current: { test: { test: [1, { test: 2 }, 3] } }, current: { one: { two: [1, 1, 3] } },
}, },
{ {
pervious: { test: { test: [1, { test: 1 }, { test: 3, test1: { test: 3 } }] } }, pervious: { one: { two: [1, { three: 1 }, 3] } },
current: { test: { test: [1, { test: 1 }, { test: 3, test1: { test: 1 } }] } }, current: { one: { two: [1, { three: 2 }, 3] } },
},
{
pervious: { one: { two: [1, { three: 1 }, { four: 3, five: { six: 3 } }] } },
current: { one: { two: [1, { three: 1 }, { four: 3, five: { six: 1 } }] } },
},
{
pervious: { one: { two: [1, { three: 1 }, { four: 3, five: { sixxx: 3 } }] } },
current: { one: { two: [1, { three: 1 }, { four: 3, five: { six: 1 } }] } },
}, },
]; ];