diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-31 15:37:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-31 15:37:35 +0800 |
| commit | d5f14083061f2ce6a42313188443a42e30796320 (patch) | |
| tree | cc6a9889e08b29595a76a33b9e7b4ef84866468b /node_modules/postcss-unnth/test/index.js | |
| parent | b1a6ea021f29f182b62f9f81024a3d8ac8621b7f (diff) | |
added make browserlist(autoprefixer) work fixed
Diffstat (limited to 'node_modules/postcss-unnth/test/index.js')
| -rw-r--r-- | node_modules/postcss-unnth/test/index.js | 64 |
1 files changed, 0 insertions, 64 deletions
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); - }); - }); - }); -}); |
