Update (de)serializing test.

This commit is contained in:
Bauke 2022-10-25 12:25:41 +02:00
parent c72959841f
commit d4400c5c31
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 10 additions and 1 deletions

View File

@ -37,7 +37,14 @@ test('dataMigrations unhappy path', async (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');
serialized.extra = 'Extra';

View File

@ -53,6 +53,7 @@ Generated by [AVA](https://avajs.dev).
qi1: {
added: '2022-03-02T16:00:00.000Z',
id: 1,
sortIndex: 1,
text: 'Sample',
url: 'https://example.org',
},
@ -64,6 +65,7 @@ Generated by [AVA](https://avajs.dev).
{
added: Date 2022-03-02 16:00:00 UTC {},
id: 1,
sortIndex: 1,
text: 'Sample',
url: 'https://example.org',
},