From 0dc95abcfcb02376d138e99c4f251249d406f543 Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Sun, 12 Oct 2014 17:36:31 +0200 Subject: [PATCH] Readibilise transformer test --- .../tests/services/transformer.js.coffee | 116 ++++++------------ 1 file changed, 36 insertions(+), 80 deletions(-) diff --git a/source/documents/tests/services/transformer.js.coffee b/source/documents/tests/services/transformer.js.coffee index 0d8b600..c2c7479 100644 --- a/source/documents/tests/services/transformer.js.coffee +++ b/source/documents/tests/services/transformer.js.coffee @@ -9,96 +9,52 @@ module "transformer", { transformer = injector.get "transformer" english = { - meta: { - Title: "Ten Commandments" - Author: "God knows" - } - content: [{ - section: "1" - text: "Thou shalt have no other gods before me" - }, { - section: "2" - text: "Thou shalt not take the name of the Lord thy God in vain" - }, { - section: "3" - text: "Remember the sabbath day, to keep it holy" - }] + meta: { Title: "Ten Commandments", Author: "God knows" } + content: [ + { section: "1", text: "Thou shalt have no other gods before me" } + { section: "2", text: "Thou shalt not take the name of the Lord thy God in vain" } + { section: "3", text: "Remember the sabbath day, to keep it holy" } + ] } czech = { - meta: { - Title: "Desatero" - Author: "Ví bůh" - } - content: [{ - section: "1" - text: "V jednoho Boha věřiti budeš." - }, { - section: "2" - text: "Nevezmeš jména Božího nadarmo." - }, { - section: "3" - text: "Pomni, abys den sváteční světil." - }] + meta: { Title: "Desatero", Author: "Ví bůh" } + content: [ + { section: "1", text: "V jednoho Boha věřiti budeš." } + { section: "2", text: "Nevezmeš jména Božího nadarmo." } + { section: "3", text: "Pomni, abys den sváteční světil." } + ] } polish = { - meta: { - Title: "Dekalog" - Author: "Bóg wie" - } - content: [{ - section: "1" - text: "Nie będziesz miał bogów cudzych przede mną." - }, { - section: "2" - text: "Nie będziesz wzywał imienia Boga twego nadaremno." - }, { - section: "3" - text: "Pamiętaj, abyś dzień święty święcił." - }] + meta: { Title: "Dekalog", Author: "Bóg wie" } + content: [ + { section: "1", text: "Nie będziesz miał bogów cudzych przede mną." } + { section: "2", text: "Nie będziesz wzywał imienia Boga twego nadaremno." } + { section: "3", text: "Pamiętaj, abyś dzień święty święcił." } + ] } expected = { - meta: [{ - Title: "Ten Commandments" - Author: "God knows" - }, { - Title: "Desatero" - Author: "Ví bůh" - }, { - Title: "Dekalog" - Author: "Bóg wie" - }] + meta: [ + { Title: "Ten Commandments", Author: "God knows" } + { Title: "Desatero", Author: "Ví bůh" } + { Title: "Dekalog", Author: "Bóg wie" } + ] - verses: [[{ - section: "1" - text: "Thou shalt have no other gods before me" - }, { - section: "1" - text: "V jednoho Boha věřiti budeš." - }, { - section: "1" - text: "Nie będziesz miał bogów cudzych przede mną." - }], [{ - section: "2" - text: "Thou shalt not take the name of the Lord thy God in vain" - }, { - section: "2" - text: "Nevezmeš jména Božího nadarmo." - }, { - section: "2" - text: "Nie będziesz wzywał imienia Boga twego nadaremno." - }], [{ - section: "3" - text: "Remember the sabbath day, to keep it holy" - }, { - section: "3" - text: "Pomni, abys den sváteční světil." - }, { - section: "3" - text: "Pamiętaj, abyś dzień święty święcił." - }]] + verses: [[ + { section: "1", text: "Thou shalt have no other gods before me" } + { section: "1", text: "V jednoho Boha věřiti budeš." } + { section: "1", text: "Nie będziesz miał bogów cudzych przede mną." } + ], [ + { section: "2", text: "Thou shalt not take the name of the Lord thy God in vain" } + { section: "2", text: "Nevezmeš jména Božího nadarmo." } + { section: "2", text: "Nie będziesz wzywał imienia Boga twego nadaremno." } + ], [ + { section: "3", text: "Remember the sabbath day, to keep it holy" } + { section: "3", text: "Pomni, abys den sváteční světil." } + { section: "3", text: "Pamiętaj, abyś dzień święty święcił." } + ]] } }