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', () => {