postcss-resolution-independence
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -0,1 +1,5 @@ | ||
## 1.1.6 (July 22, 2024) | ||
* Removed `chai` and `mocha` dependencies | ||
## 1.1.5 (February 20, 2024) | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "postcss-resolution-independence", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Resolution independence conversion plugin for PostCSS", | ||
@@ -36,5 +36,3 @@ "author": "Jason Robitaille <jason.robitaille@lge.com>", | ||
"devDependencies": { | ||
"chai": "^4.3.10", | ||
"mocha": "^10.2.0", | ||
"postcss": "^8.4.32" | ||
"postcss": "^8.4.39" | ||
}, | ||
@@ -45,3 +43,3 @@ "peerDependencies": { | ||
"scripts": { | ||
"test": "mocha --reporter spec" | ||
"test": "enact test" | ||
}, | ||
@@ -48,0 +46,0 @@ "keywords": [ |
@@ -1,2 +0,1 @@ | ||
const chai = require('chai'); | ||
const postcss = require('postcss'); | ||
@@ -6,3 +5,2 @@ const {parse} = require('postcss-values-parser'); | ||
global.expect = chai.expect; | ||
let opts; | ||
@@ -34,4 +32,4 @@ | ||
return processValue().then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(1.5); | ||
expect(out.nodes[0].unit).to.equal('rem'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(1.5); | ||
expect(out.nodes[0].unit).toBe('rem'); | ||
}); | ||
@@ -43,4 +41,4 @@ }); | ||
return processValue().then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(2); | ||
expect(out.nodes[0].unit).to.equal('vh'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(2); | ||
expect(out.nodes[0].unit).toBe('vh'); | ||
}); | ||
@@ -52,4 +50,4 @@ }); | ||
return processValue({unit: 'em'}).then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(2); | ||
expect(out.nodes[0].unit).to.equal('rem'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(2); | ||
expect(out.nodes[0].unit).toBe('rem'); | ||
}); | ||
@@ -61,4 +59,4 @@ }); | ||
return processValue({unit: 'abspx'}).then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(48); | ||
expect(out.nodes[0].unit).to.equal('px'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(48); | ||
expect(out.nodes[0].unit).toBe('px'); | ||
}); | ||
@@ -70,4 +68,4 @@ }); | ||
return processValue({value: 0.24}).then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(0.01); | ||
expect(out.nodes[0].unit).to.equal('rem'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(0.01); | ||
expect(out.nodes[0].unit).toBe('rem'); | ||
}); | ||
@@ -79,4 +77,4 @@ }); | ||
return processValue({value: 9}).then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(9); | ||
expect(out.nodes[0].unit).to.equal('px'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(9); | ||
expect(out.nodes[0].unit).toBe('px'); | ||
}); | ||
@@ -89,4 +87,4 @@ }); | ||
return processValue().then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(24); | ||
expect(out.nodes[0].unit).to.equal('px'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(24); | ||
expect(out.nodes[0].unit).toBe('px'); | ||
}); | ||
@@ -99,4 +97,4 @@ }); | ||
return processValue().then(out => { | ||
expect(parseFloat(out.nodes[0].value)).to.equal(1.45); | ||
expect(out.nodes[0].unit).to.equal('rem'); | ||
expect(parseFloat(out.nodes[0].value)).toBe(1.45); | ||
expect(out.nodes[0].unit).toBe('rem'); | ||
}); | ||
@@ -108,3 +106,3 @@ }); | ||
describe('resolution-independence conversions', function () { | ||
before(function () { | ||
beforeAll(function () { | ||
opts = { | ||
@@ -124,3 +122,3 @@ baseSize: 24, | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('2rem'); | ||
expect(out.toString()).toBe('2rem'); | ||
}); | ||
@@ -132,3 +130,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('url("https://developer.mozilla.org/samples/cssref/images/startransparent.gif") #FFEE99 2rem bottom no-repeat'); | ||
expect(out.toString()).toBe('url("https://developer.mozilla.org/samples/cssref/images/startransparent.gif") #FFEE99 2rem bottom no-repeat'); | ||
}); | ||
@@ -140,3 +138,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('2rem 0.1rem,1.5rem,1rem'); | ||
expect(out.toString()).toBe('2rem 0.1rem,1.5rem,1rem'); | ||
}); | ||
@@ -148,3 +146,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('translate3d(2rem, 1.5rem, 0.75rem)'); | ||
expect(out.toString()).toBe('translate3d(2rem, 1.5rem, 0.75rem)'); | ||
}); | ||
@@ -156,3 +154,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('-webkit-linear-gradient(top, rgba(0,255,255,0), rgba(255,255,0,1) 0.75rem, rgba(255,255,0,0) 2.5rem, rgba(0,255,255,0))'); | ||
expect(out.toString()).toBe('-webkit-linear-gradient(top, rgba(0,255,255,0), rgba(255,255,0,1) 0.75rem, rgba(255,255,0,0) 2.5rem, rgba(0,255,255,0))'); | ||
}); | ||
@@ -164,3 +162,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('0.5'); | ||
expect(out.toString()).toBe('0.5'); | ||
}); | ||
@@ -172,3 +170,3 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('50%'); | ||
expect(out.toString()).toBe('50%'); | ||
}); | ||
@@ -180,5 +178,5 @@ }); | ||
return processValue({css}).then(out => { | ||
expect(out.toString()).to.equal('rgba(50, 50, 50, 0.8)'); | ||
expect(out.toString()).toBe('rgba(50, 50, 50, 0.8)'); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
23080
204