summaryrefslogtreecommitdiff
path: root/node_modules/laggard/test
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/laggard/test
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/laggard/test')
-rw-r--r--node_modules/laggard/test/fixtures/opacity.css8
-rw-r--r--node_modules/laggard/test/fixtures/opacity.expected.css9
-rw-r--r--node_modules/laggard/test/fixtures/pixrem.css3
-rw-r--r--node_modules/laggard/test/fixtures/pixrem.expected.css4
-rw-r--r--node_modules/laggard/test/fixtures/pseudo.css7
-rw-r--r--node_modules/laggard/test/fixtures/pseudo.expected.css7
-rw-r--r--node_modules/laggard/test/fixtures/rgba.css11
-rw-r--r--node_modules/laggard/test/fixtures/rgba.expected.css14
-rw-r--r--node_modules/laggard/test/fixtures/vmin.css7
-rw-r--r--node_modules/laggard/test/fixtures/vmin.expected.css9
-rw-r--r--node_modules/laggard/test/fixtures/willchange.css3
-rw-r--r--node_modules/laggard/test/fixtures/willchange.expected.css4
-rw-r--r--node_modules/laggard/test/test.js74
13 files changed, 0 insertions, 160 deletions
diff --git a/node_modules/laggard/test/fixtures/opacity.css b/node_modules/laggard/test/fixtures/opacity.css
deleted file mode 100644
index 0523e50a..00000000
--- a/node_modules/laggard/test/fixtures/opacity.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.foo {
- opacity: .5;
-}
-
-.bar {
- opacity: .5;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/opacity.expected.css b/node_modules/laggard/test/fixtures/opacity.expected.css
deleted file mode 100644
index 5094278b..00000000
--- a/node_modules/laggard/test/fixtures/opacity.expected.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.foo {
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
- opacity: .5;
-}
-
-.bar {
- opacity: .5;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/pixrem.css b/node_modules/laggard/test/fixtures/pixrem.css
deleted file mode 100644
index 0c47cef4..00000000
--- a/node_modules/laggard/test/fixtures/pixrem.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.foo {
- font-size: 2rem;
-}
diff --git a/node_modules/laggard/test/fixtures/pixrem.expected.css b/node_modules/laggard/test/fixtures/pixrem.expected.css
deleted file mode 100644
index dab3157b..00000000
--- a/node_modules/laggard/test/fixtures/pixrem.expected.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.foo {
- font-size: 32px;
- font-size: 2rem;
-}
diff --git a/node_modules/laggard/test/fixtures/pseudo.css b/node_modules/laggard/test/fixtures/pseudo.css
deleted file mode 100644
index ae381e67..00000000
--- a/node_modules/laggard/test/fixtures/pseudo.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.foo:before {
- display: block;
-}
-
-.bar::after {
- display: none;
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/pseudo.expected.css b/node_modules/laggard/test/fixtures/pseudo.expected.css
deleted file mode 100644
index c450fde9..00000000
--- a/node_modules/laggard/test/fixtures/pseudo.expected.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.foo:before {
- display: block;
-}
-
-.bar:after {
- display: none;
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/rgba.css b/node_modules/laggard/test/fixtures/rgba.css
deleted file mode 100644
index 994ea3f8..00000000
--- a/node_modules/laggard/test/fixtures/rgba.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.foo {
- background: rgba(153, 221, 153, 0.8);
- color: rgba(0, 0, 0, .4);
-}
-
-.bar {
- background: rgba(153, 221, 153, 0.8);
- background: rgba(153, 221, 153, 0.8);
- color: #ffffff;
- color: rgba(0, 0, 0, .4);
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/rgba.expected.css b/node_modules/laggard/test/fixtures/rgba.expected.css
deleted file mode 100644
index b48f909e..00000000
--- a/node_modules/laggard/test/fixtures/rgba.expected.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.foo {
- background: #99dd99;
- background: rgba(153, 221, 153, 0.8);
- color: #000000;
- color: rgba(0, 0, 0, .4);
-}
-
-.bar {
- background: #99dd99;
- background: rgba(153, 221, 153, 0.8);
- background: rgba(153, 221, 153, 0.8);
- color: #ffffff;
- color: rgba(0, 0, 0, .4);
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/vmin.css b/node_modules/laggard/test/fixtures/vmin.css
deleted file mode 100644
index b28275de..00000000
--- a/node_modules/laggard/test/fixtures/vmin.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.foo {
- width: 50vmin;
-}
-
-.bar {
- width: calc(100vmin - 1px);
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/vmin.expected.css b/node_modules/laggard/test/fixtures/vmin.expected.css
deleted file mode 100644
index 5ffc9a7d..00000000
--- a/node_modules/laggard/test/fixtures/vmin.expected.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.foo {
- width: 50vm;
- width: 50vmin;
-}
-
-.bar {
- width: calc(100vm - 1px);
- width: calc(100vmin - 1px);
-} \ No newline at end of file
diff --git a/node_modules/laggard/test/fixtures/willchange.css b/node_modules/laggard/test/fixtures/willchange.css
deleted file mode 100644
index 117c5cfa..00000000
--- a/node_modules/laggard/test/fixtures/willchange.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.foo {
- will-change: transform;
-}
diff --git a/node_modules/laggard/test/fixtures/willchange.expected.css b/node_modules/laggard/test/fixtures/willchange.expected.css
deleted file mode 100644
index c3912928..00000000
--- a/node_modules/laggard/test/fixtures/willchange.expected.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.foo {
- backface-visibility: hidden;
- will-change: transform;
-}
diff --git a/node_modules/laggard/test/test.js b/node_modules/laggard/test/test.js
deleted file mode 100644
index 962b53cd..00000000
--- a/node_modules/laggard/test/test.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* eslint-disable */
-
-'use strict';
-
-const postcss = require('postcss');
-const expect = require('chai').expect;
-const fs = require('fs');
-const path = require('path');
-const spawn = require('child_process').spawn;
-const rucksack = require('../');
-
-function test(fixture, opts, done) {
- let input = fixture + '.css',
- expected = fixture + '.expected.css';
-
- input = fs.readFileSync(path.join(__dirname, 'fixtures', input), 'utf8');
- expected = fs.readFileSync(path.join(__dirname, 'fixtures', expected), 'utf8');
-
- postcss([ rucksack(opts) ])
- .process(input)
- .then(result => {
- expect(result.css).to.eql(expected);
- expect(result.warnings()).to.be.empty;
- done();
- }).catch(error => {
- done(error);
- });
-};
-
-function cli(cmd, callback) {
- process.chdir(__dirname);
-
- let ps,
- out = '',
- err = '';
-
- ps = spawn(process.execPath, [
- path.resolve(__dirname, '../bin/cmd.js')
- ].concat(cmd));
-
- ps.stdout.on('data', buffer => out += buffer);
- ps.stderr.on('data', buffer => err += buffer);
- ps.on('exit', function(code) {
- callback.call(this, err, out, code);
- });
-};
-
-function cliTest(fixture, args, done) {
- let input = fixture + '.css',
- expected = fixture + '.expected.css';
-
- input = path.join(__dirname, 'fixtures', input);
- expected = path.join(__dirname, 'fixtures', expected);
-
- cli([input, args], (err, out, code) => {
- expect(out).to.eql(fs.readFileSync(expected, 'utf8'));
- expect(err).to.be.empty;
- expect(code).to.eql(0);
- done();
- });
-};
-
-describe('Laggard', () => {
- it('creates rgba fallbacks', done => test('rgba', {}, done));
- it('creates opacity fallbacks', done => test('opacity', {}, done));
- it('converts pseudoelements', done => test('pseudo', {}, done));
- it('creates vmin fallbacks', done => test('vmin', {}, done));
- it('creates rem fallbacks', done => test('pixrem', {}, done));
- it('sets will-change hack', done => test('willchange', {}, done));
-
- describe('cli', () => {
- it('processes css on the command line', done => cliTest('rgba', '', done));
- });
-});