From be414e5b5247c8fffad555e09ead143062d2a700 Mon Sep 17 00:00:00 2001 From: kevinkace Date: Thu, 8 Sep 2016 13:45:03 -0700 Subject: [PATCH] Add group all test --- test/api-groups.js | 10 +++++++++ test/fixtures/groups/all.expected.html | 28 +++++++++++++------------- test/fixtures/groups/all.html | 2 +- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/test/api-groups.js b/test/api-groups.js index f6acea4..40b94f2 100644 --- a/test/api-groups.js +++ b/test/api-groups.js @@ -9,6 +9,16 @@ const assert = require("assert"), describe("/lib", () => { describe("/pseudo.js", () => { + // all + it("should run posthtml with pseudo using group all", () => + posthtml() + .use(pseudo({ include : "all" })) + .process(fixtures.groups.all.input) + .then((result) => { + assert.equal(result.html, fixtures.groups.all.expected); + }) + ); + // firstLastOnly it("should run posthtml with pseudo using group firstLastOnly", () => posthtml() diff --git a/test/fixtures/groups/all.expected.html b/test/fixtures/groups/all.expected.html index 64b148f..2985154 100644 --- a/test/fixtures/groups/all.expected.html +++ b/test/fixtures/groups/all.expected.html @@ -4,47 +4,47 @@ page title -

header

+

header

- + - +
outer -
Inner
+
Inner
- + -