summaryrefslogtreecommitdiff
path: root/node_modules/postcss-unroot/test
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-unroot/test')
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.actual.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.copy.actual.css6
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.copy.expect.css6
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.expect.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.warn.actual.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/basic.warn.expect.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/class.actual.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/class.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/class.expect.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/svg.actual.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/svg.css3
-rw-r--r--node_modules/postcss-unroot/test/fixtures/svg.expect.css3
-rw-r--r--node_modules/postcss-unroot/test/index.js83
14 files changed, 0 insertions, 128 deletions
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.actual.css b/node_modules/postcss-unroot/test/fixtures/basic.actual.css
deleted file mode 100644
index 2c0cc73b..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.actual.css
+++ /dev/null
@@ -1,3 +0,0 @@
-html {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.copy.actual.css b/node_modules/postcss-unroot/test/fixtures/basic.copy.actual.css
deleted file mode 100644
index e062ae5d..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.copy.actual.css
+++ /dev/null
@@ -1,6 +0,0 @@
-html {
- color: red;
-}
-:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.copy.expect.css b/node_modules/postcss-unroot/test/fixtures/basic.copy.expect.css
deleted file mode 100644
index e062ae5d..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.copy.expect.css
+++ /dev/null
@@ -1,6 +0,0 @@
-html {
- color: red;
-}
-:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.css b/node_modules/postcss-unroot/test/fixtures/basic.css
deleted file mode 100644
index b5c5c477..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.css
+++ /dev/null
@@ -1,3 +0,0 @@
-:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.expect.css b/node_modules/postcss-unroot/test/fixtures/basic.expect.css
deleted file mode 100644
index 2c0cc73b..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.expect.css
+++ /dev/null
@@ -1,3 +0,0 @@
-html {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.warn.actual.css b/node_modules/postcss-unroot/test/fixtures/basic.warn.actual.css
deleted file mode 100644
index b5c5c477..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.warn.actual.css
+++ /dev/null
@@ -1,3 +0,0 @@
-:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/basic.warn.expect.css b/node_modules/postcss-unroot/test/fixtures/basic.warn.expect.css
deleted file mode 100644
index b5c5c477..00000000
--- a/node_modules/postcss-unroot/test/fixtures/basic.warn.expect.css
+++ /dev/null
@@ -1,3 +0,0 @@
-:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/class.actual.css b/node_modules/postcss-unroot/test/fixtures/class.actual.css
deleted file mode 100644
index 586a912b..00000000
--- a/node_modules/postcss-unroot/test/fixtures/class.actual.css
+++ /dev/null
@@ -1,3 +0,0 @@
-html.foo {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/class.css b/node_modules/postcss-unroot/test/fixtures/class.css
deleted file mode 100644
index 5dfd4d4e..00000000
--- a/node_modules/postcss-unroot/test/fixtures/class.css
+++ /dev/null
@@ -1,3 +0,0 @@
-:root.foo {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/class.expect.css b/node_modules/postcss-unroot/test/fixtures/class.expect.css
deleted file mode 100644
index 586a912b..00000000
--- a/node_modules/postcss-unroot/test/fixtures/class.expect.css
+++ /dev/null
@@ -1,3 +0,0 @@
-html.foo {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/svg.actual.css b/node_modules/postcss-unroot/test/fixtures/svg.actual.css
deleted file mode 100644
index 7ad6e896..00000000
--- a/node_modules/postcss-unroot/test/fixtures/svg.actual.css
+++ /dev/null
@@ -1,3 +0,0 @@
-svg {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/svg.css b/node_modules/postcss-unroot/test/fixtures/svg.css
deleted file mode 100644
index 9ac9f497..00000000
--- a/node_modules/postcss-unroot/test/fixtures/svg.css
+++ /dev/null
@@ -1,3 +0,0 @@
-svg:root {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/fixtures/svg.expect.css b/node_modules/postcss-unroot/test/fixtures/svg.expect.css
deleted file mode 100644
index 7ad6e896..00000000
--- a/node_modules/postcss-unroot/test/fixtures/svg.expect.css
+++ /dev/null
@@ -1,3 +0,0 @@
-svg {
- color: red;
-}
diff --git a/node_modules/postcss-unroot/test/index.js b/node_modules/postcss-unroot/test/index.js
deleted file mode 100644
index a421357c..00000000
--- a/node_modules/postcss-unroot/test/index.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var tests = {
- 'postcss-unroot': {
- 'basic': {
- message: 'supports basic usage'
- },
- 'basic:copy': {
- message: 'supports "copy" usage',
- options: {
- method: 'copy'
- }
- },
- 'basic:warn': {
- message: 'supports "warn" usage',
- options: {
- method: 'warn'
- },
- warning: 1
- },
- 'svg': {
- message: 'supports usage with <svg>'
- },
- 'class': {
- message: 'supports usage with class'
- }
- }
-};
-
-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);
- });
- });
- });
-});