Update (de)serializing test.
This commit is contained in:
parent
c72959841f
commit
d4400c5c31
|
@ -37,7 +37,14 @@ test('dataMigrations unhappy path', async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Serializing & Deserializing Queue', (t) => {
|
test('Serializing & Deserializing Queue', (t) => {
|
||||||
const serialized = serializeQueue([queueItemSample]);
|
const sample: Queue.Item = {
|
||||||
|
added: queueItemSample.added,
|
||||||
|
id: queueItemSample.id,
|
||||||
|
sortIndex: queueItemSample.id,
|
||||||
|
text: queueItemSample.text,
|
||||||
|
url: queueItemSample.url,
|
||||||
|
};
|
||||||
|
const serialized = serializeQueue([sample]);
|
||||||
t.snapshot(serialized, 'Serialized');
|
t.snapshot(serialized, 'Serialized');
|
||||||
|
|
||||||
serialized.extra = 'Extra';
|
serialized.extra = 'Extra';
|
||||||
|
|
|
@ -53,6 +53,7 @@ Generated by [AVA](https://avajs.dev).
|
||||||
qi1: {
|
qi1: {
|
||||||
added: '2022-03-02T16:00:00.000Z',
|
added: '2022-03-02T16:00:00.000Z',
|
||||||
id: 1,
|
id: 1,
|
||||||
|
sortIndex: 1,
|
||||||
text: 'Sample',
|
text: 'Sample',
|
||||||
url: 'https://example.org',
|
url: 'https://example.org',
|
||||||
},
|
},
|
||||||
|
@ -64,6 +65,7 @@ Generated by [AVA](https://avajs.dev).
|
||||||
{
|
{
|
||||||
added: Date 2022-03-02 16:00:00 UTC {},
|
added: Date 2022-03-02 16:00:00 UTC {},
|
||||||
id: 1,
|
id: 1,
|
||||||
|
sortIndex: 1,
|
||||||
text: 'Sample',
|
text: 'Sample',
|
||||||
url: 'https://example.org',
|
url: 'https://example.org',
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue