From 2de746d7d67ea235b9bee36789024f42b07c7f51 Mon Sep 17 00:00:00 2001 From: Kenneth Ormandy Date: Fri, 27 Jun 2014 13:49:13 -0700 Subject: [PATCH] Adds failing test for inlining non-templating languages --- test/fixtures/templates/inline.jade | 5 +++++ test/fixtures/templates/nest/inline.coffee | 1 + test/fixtures/templates/nest/inline.scss | 5 +++++ test/templates.js | 10 ++++++++++ 4 files changed, 21 insertions(+) create mode 100644 test/fixtures/templates/inline.jade create mode 100644 test/fixtures/templates/nest/inline.coffee create mode 100644 test/fixtures/templates/nest/inline.scss diff --git a/test/fixtures/templates/inline.jade b/test/fixtures/templates/inline.jade new file mode 100644 index 000000000..60d1fb7c0 --- /dev/null +++ b/test/fixtures/templates/inline.jade @@ -0,0 +1,5 @@ +style. + != partial("nest/inline.scss") + +script. + != partial("nest/inline.coffee") diff --git a/test/fixtures/templates/nest/inline.coffee b/test/fixtures/templates/nest/inline.coffee new file mode 100644 index 000000000..f51bcd256 --- /dev/null +++ b/test/fixtures/templates/nest/inline.coffee @@ -0,0 +1 @@ +alert "Hi" diff --git a/test/fixtures/templates/nest/inline.scss b/test/fixtures/templates/nest/inline.scss new file mode 100644 index 000000000..9cbecef7a --- /dev/null +++ b/test/fixtures/templates/nest/inline.scss @@ -0,0 +1,5 @@ +$color: cornflowerblue; + +body { + background: $color; +} diff --git a/test/templates.js b/test/templates.js index 81e7d08a5..8b26ed778 100644 --- a/test/templates.js +++ b/test/templates.js @@ -77,6 +77,16 @@ describe("templates", function(){ }) }) + it("should inline preprocessed files", function(done){ + poly.render("inline.jade", function(error, body){ + should.not.exist(error) + should.exist(body) + body.should.include("body{background:cornflowerblue}") + body.should.include("alert(\"Hi\")") + done() + }) + }) + }) })