mirror of
https://github.com/wassname/side-by-side.git
synced 2026-08-21 11:21:53 +08:00
33 lines
719 B
CoffeeScript
33 lines
719 B
CoffeeScript
reader = {}
|
|
|
|
module "json reader", {
|
|
setup: ->
|
|
reader = getInjector().get 'jsonReader'
|
|
}
|
|
|
|
test "loads poem", ->
|
|
deepEqual reader("""
|
|
{
|
|
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>" },
|
|
],
|
|
}
|
|
"""),
|
|
{
|
|
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>" }
|
|
]
|
|
}
|