reader = {} module "json reader", { setup: () -> reader = injector.get "jsonReader" } test "loads poem", () -> deepEqual reader(""" { meta: { Title: "Test leading text" }, content: [ "

This is leading text.

", { section: "I", text: "

First section.

" }, { section: "II", text: "

Second section.

" }, { text: "

Another section.

" }, ], } """), { meta: { Title: "Test leading text" } content: [ { section: "", text: "

This is leading text.

" } { section: "I", text: "

First section.

" } { section: "II", text: "

Second section.

" } { section: "", text: "

Another section.

" } ] }