From 8cc92c8b0b4a530ab6bf2761c091257dbbeb0988 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 20 Nov 2022 17:44:22 +0300 Subject: [PATCH] Update i.mjh.nz.test.js --- sites/i.mjh.nz/i.mjh.nz.test.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sites/i.mjh.nz/i.mjh.nz.test.js b/sites/i.mjh.nz/i.mjh.nz.test.js index 7938511f..09051478 100644 --- a/sites/i.mjh.nz/i.mjh.nz.test.js +++ b/sites/i.mjh.nz/i.mjh.nz.test.js @@ -25,22 +25,20 @@ it('can generate valid url', () => { it('can parse response', () => { const content = ` Little Stars Universe Barney and Friends Baby Bop forgets to say "please" and "thank you". Riff shares his dream of becoming an inventor. Children & Family Barney and Friends Baby Bop forgets to say "please" and "thank you". Riff shares his dream of becoming an inventor. Children & Family ` - const result = parser({ content, channel, date }).map(p => { - p.start = p.start.toJSON() - p.stop = p.stop.toJSON() - return p - }) + const results = parser({ content, channel, date }) - expect(result).toMatchObject([ - { - start: '2022-05-03T10:49:22.000Z', - stop: '2022-05-03T11:21:22.000Z', - title: 'Barney and Friends', - description: - 'Baby Bop forgets to say "please" and "thank you". Riff shares his dream of becoming an inventor.', - category: ['Children', 'Family'] - } - ]) + expect(results[0]).toMatchObject({ + start: '2022-05-03T10:49:22.000Z', + stop: '2022-05-03T11:21:22.000Z', + title: [{ value: 'Barney and Friends' }], + desc: [ + { + value: + 'Baby Bop forgets to say "please" and "thank you". Riff shares his dream of becoming an inventor.' + } + ], + category: [{ value: 'Children & Family' }] + }) }) it('can handle empty guide', () => {