Files
side-by-side/source/documents/tests/services/reader/json.js.coffee
T
2013-06-15 19:56:44 +01:00

30 lines
709 B
CoffeeScript

test("jsonReader", () ->
testCases = [{
tested: """
{
meta: {
Title: "Test leading text"
},
content: [
"<p><strong>This</strong> is leading text.</p>",
{ section: "I", text: "<p>First section.</p>" },
{ section: "II", text: "<p>Second section.</p>" },
{ text: "<p>Another section.</p>" },
],
}"""
expected: {
meta: {
Title: "Test leading text"
}
content: [
{ section: "", text: "<p><strong>This</strong> is leading text.</p>" }
{ section: "I", text: "<p>First section.</p>" }
{ section: "II", text: "<p>Second section.</p>" }
{ section: "", text: "<p>Another section.</p>" }
]
}
}]
testReader("jsonReader", testCases)
)