summaryrefslogtreecommitdiff
path: root/node_modules/postcss-unnth/test
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-unnth/test')
-rw-r--r--node_modules/postcss-unnth/test/fixtures/basic.actual.css27
-rw-r--r--node_modules/postcss-unnth/test/fixtures/basic.css27
-rw-r--r--node_modules/postcss-unnth/test/fixtures/basic.expect.css27
-rw-r--r--node_modules/postcss-unnth/test/index.js64
4 files changed, 0 insertions, 145 deletions
diff --git a/node_modules/postcss-unnth/test/fixtures/basic.actual.css b/node_modules/postcss-unnth/test/fixtures/basic.actual.css
deleted file mode 100644
index 362f3558..00000000
--- a/node_modules/postcss-unnth/test/fixtures/basic.actual.css
+++ /dev/null
@@ -1,27 +0,0 @@
-:first-child {
- color: red;
-}
-
-p:first-child {
- color: red;
-}
-
-.foo:first-child {
- color: red;
-}
-
-.before1 .before2 > :first-child > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * + * > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * + * + .during1.during2 > .during3 {
- color: red;
-}
diff --git a/node_modules/postcss-unnth/test/fixtures/basic.css b/node_modules/postcss-unnth/test/fixtures/basic.css
deleted file mode 100644
index 8f8da788..00000000
--- a/node_modules/postcss-unnth/test/fixtures/basic.css
+++ /dev/null
@@ -1,27 +0,0 @@
-:nth-child(1) {
- color: red;
-}
-
-p:nth-child(1) {
- color: red;
-}
-
-.foo:nth-child(1) {
- color: red;
-}
-
-.before1 .before2 > :nth-child(1) > .during3 {
- color: red;
-}
-
-.before1 .before2 > :nth-child(2) > .during3 {
- color: red;
-}
-
-.before1 .before2 > :nth-child(3) > .during3 {
- color: red;
-}
-
-.before1 .before2 > .during1:nth-child(4).during2 > .during3 {
- color: red;
-}
diff --git a/node_modules/postcss-unnth/test/fixtures/basic.expect.css b/node_modules/postcss-unnth/test/fixtures/basic.expect.css
deleted file mode 100644
index 362f3558..00000000
--- a/node_modules/postcss-unnth/test/fixtures/basic.expect.css
+++ /dev/null
@@ -1,27 +0,0 @@
-:first-child {
- color: red;
-}
-
-p:first-child {
- color: red;
-}
-
-.foo:first-child {
- color: red;
-}
-
-.before1 .before2 > :first-child > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * + * > .during3 {
- color: red;
-}
-
-.before1 .before2 > :first-child + * + * + .during1.during2 > .during3 {
- color: red;
-}
diff --git a/node_modules/postcss-unnth/test/index.js b/node_modules/postcss-unnth/test/index.js
deleted file mode 100644
index 3682dd92..00000000
--- a/node_modules/postcss-unnth/test/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var tests = {
- 'postcss-unnth': {
- 'basic': {
- message: 'supports basic usage'
- }
- }
-};
-
-var debug = true;
-var dir = './test/fixtures/';
-
-var fs = require('fs');
-var path = require('path');
-var plugin = require('../');
-var test = require('tape');
-
-Object.keys(tests).forEach(function (name) {
- var parts = tests[name];
-
- test(name, function (t) {
- var fixtures = Object.keys(parts);
-
- t.plan(fixtures.length * 2);
-
- fixtures.forEach(function (fixture) {
- var message = parts[fixture].message;
- var options = parts[fixture].options;
- var warning = parts[fixture].warning || 0;
- var warningMsg = message + ' (# of warnings)';
-
- var baseName = fixture.split(':')[0];
- var testName = fixture.split(':').join('.');
-
- var inputPath = path.resolve(dir + baseName + '.css');
- var expectPath = path.resolve(dir + testName + '.expect.css');
- var actualPath = path.resolve(dir + testName + '.actual.css');
-
- var inputCSS = '';
- var expectCSS = '';
-
- try {
- inputCSS = fs.readFileSync(inputPath, 'utf8');
- } catch (error) {
- fs.writeFileSync(inputPath, inputCSS);
- }
-
- try {
- expectCSS = fs.readFileSync(expectPath, 'utf8');
- } catch (error) {
- fs.writeFileSync(expectPath, expectCSS);
- }
-
- plugin.process(inputCSS, options).then(function (result) {
- var actualCSS = result.css;
-
- if (debug) fs.writeFileSync(actualPath, actualCSS);
-
- t.equal(actualCSS, expectCSS, message);
-
- t.equal(result.warnings().length, warning, warningMsg);
- });
- });
- });
-});