Files
side-by-side/source/documents/scripts/tests/reader/json.js.coffee
T
Vit Brunner 8c777c5301 Switch to tabs for indentation
I got drunk, read the coffeescript style guide, and decided to use
spaces. Spaces for indentation is still as bad an idea as it ever were,
and this is not a coffeescript project - it's multilingual, hence using
coffeescript conventions is pointless.
2013-06-15 16:55:27 +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)
)