diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-unopacity/test | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/postcss-unopacity/test')
10 files changed, 0 insertions, 112 deletions
diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.actual.css b/node_modules/postcss-unopacity/test/fixtures/basic.actual.css deleted file mode 100644 index 3cd9eeb3..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.actual.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - filter: alpha(opacity=50); -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.copy.actual.css b/node_modules/postcss-unopacity/test/fixtures/basic.copy.actual.css deleted file mode 100644 index 2a1aae19..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.copy.actual.css +++ /dev/null @@ -1,4 +0,0 @@ -.figure { - filter: alpha(opacity=50); - opacity: .5; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.copy.expect.css b/node_modules/postcss-unopacity/test/fixtures/basic.copy.expect.css deleted file mode 100644 index 2a1aae19..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.copy.expect.css +++ /dev/null @@ -1,4 +0,0 @@ -.figure { - filter: alpha(opacity=50); - opacity: .5; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.css b/node_modules/postcss-unopacity/test/fixtures/basic.css deleted file mode 100644 index d63a75f7..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - opacity: .5; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.expect.css b/node_modules/postcss-unopacity/test/fixtures/basic.expect.css deleted file mode 100644 index 3cd9eeb3..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.expect.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - filter: alpha(opacity=50); -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.actual.css b/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.actual.css deleted file mode 100644 index b5f6b3d2..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.actual.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.expect.css b/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.expect.css deleted file mode 100644 index b5f6b3d2..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.prefixed.expect.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.warn.actual.css b/node_modules/postcss-unopacity/test/fixtures/basic.warn.actual.css deleted file mode 100644 index d63a75f7..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.warn.actual.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - opacity: .5; -} diff --git a/node_modules/postcss-unopacity/test/fixtures/basic.warn.expect.css b/node_modules/postcss-unopacity/test/fixtures/basic.warn.expect.css deleted file mode 100644 index d63a75f7..00000000 --- a/node_modules/postcss-unopacity/test/fixtures/basic.warn.expect.css +++ /dev/null @@ -1,3 +0,0 @@ -.figure { - opacity: .5; -} diff --git a/node_modules/postcss-unopacity/test/index.js b/node_modules/postcss-unopacity/test/index.js deleted file mode 100644 index b8243c58..00000000 --- a/node_modules/postcss-unopacity/test/index.js +++ /dev/null @@ -1,83 +0,0 @@ -var tests = { - 'postcss-unopacity': { - '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 - }, - 'basic:prefixed': { - message: 'supports "prefixed" usage', - options: { - prefixed: true - } - } - } -}; - -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); - }); - }); - }); -}); |
