summaryrefslogtreecommitdiff
path: root/node_modules/oldie/test
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/oldie/test')
-rw-r--r--node_modules/oldie/test/fixtures/basic.css25
-rw-r--r--node_modules/oldie/test/fixtures/basic.expect.css17
-rw-r--r--node_modules/oldie/test/test.js52
3 files changed, 0 insertions, 94 deletions
diff --git a/node_modules/oldie/test/fixtures/basic.css b/node_modules/oldie/test/fixtures/basic.css
deleted file mode 100644
index 160920ef..00000000
--- a/node_modules/oldie/test/fixtures/basic.css
+++ /dev/null
@@ -1,25 +0,0 @@
-:root body {
- background-color: rgba(0, 0, 0, .9);
- color: white;
-}
-
-@media screen and (max-width: 767px) {
- :root body {
- font-size: 1rem;
- }
-}
-
-@media screen and (min-width: 768px) {
- :root body {
- font-size: .75rem;
- }
-
- .header:not(header), header::after {
- content: "";
- opacity: calc(1 / 2);
- }
-
- p:nth-child(2) {
- font-weight: bold;
- }
-}
diff --git a/node_modules/oldie/test/fixtures/basic.expect.css b/node_modules/oldie/test/fixtures/basic.expect.css
deleted file mode 100644
index 238f1a61..00000000
--- a/node_modules/oldie/test/fixtures/basic.expect.css
+++ /dev/null
@@ -1,17 +0,0 @@
-html body {
- background-color: #000000;
- color: white;
-}
-
-html body {
- font-size: 12px;
-}
-
- header:after {
- content: "";
- filter: alpha(opacity=50);
-}
-
-:first-child + p {
- font-weight: bold;
-}
diff --git a/node_modules/oldie/test/test.js b/node_modules/oldie/test/test.js
deleted file mode 100644
index f33eff82..00000000
--- a/node_modules/oldie/test/test.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var tests = {
- 'oldie': {
- 'basic': {
- message: 'supports basic usage'
- }
- }
-};
-
-var debug = false;
-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 = fs.readFileSync(inputPath, 'utf8');
- var expectCSS = fs.readFileSync(expectPath, 'utf8');
-
- 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);
- });
- });
- });
-});