Skip to content

Commit e2bf3ce

Browse files
committed
expand customfields test
1 parent a7e3de6 commit e2bf3ce

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

test/input/customfields.rss

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
<copyright>
1111
Copyright © 2017 Varthabharathi. All rights reserved.
1212
</copyright>
13+
<nested-field>
14+
<nest1>foo</nest1>
15+
<nest2>
16+
<nest3>bar</nest3>
17+
</nest2>
18+
</nested-field>
1319
<description>
1420
<![CDATA[
1521
Varthabharathi - A Kannada news portal brings latest news, headlines in kannada from India, world, business, politics, sports and entertainment!

test/output/customfields.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@
171171
"description": "\n \n Varthabharathi - A Kannada news portal brings latest news, headlines in kannada from India, world, business, politics, sports and entertainment!\n \n ",
172172
"link": "http://www.varthabahrati.in",
173173
"language": "kn",
174-
"copyright": "\n Copyright © 2017 Varthabharathi. All rights reserved.\n "
174+
"copyright": "\n Copyright © 2017 Varthabharathi. All rights reserved.\n ",
175+
"nested-field": {
176+
"nest1": [
177+
"foo"
178+
],
179+
"nest2": [
180+
{
181+
"nest3": [
182+
"bar"
183+
]
184+
}
185+
]
186+
}
175187
}
176188
}

test/parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('Parser', function() {
7070
it('should parse custom fields', function(done) {
7171
var options = {
7272
customFields: {
73-
feed: ['language', 'copyright'],
73+
feed: ['language', 'copyright', 'nested-field'],
7474
item: ['subtitle']
7575
}
7676
};

0 commit comments

Comments
 (0)