From d78959c6ca44c024127eb2bd838afa14f3a9cd42 Mon Sep 17 00:00:00 2001 From: Josh Junon Date: Fri, 9 Oct 2020 09:30:17 +0200 Subject: [PATCH] bump color-string and add regression test for #174 (fixes #174) --- package.json | 2 +- test/index.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a19d33a..870aaa8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "dependencies": { "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-string": "^1.5.4" }, "devDependencies": { "mocha": "^6.1.4", diff --git a/test/index.js b/test/index.js index b07a9a0..bdcb98c 100644 --- a/test/index.js +++ b/test/index.js @@ -675,3 +675,11 @@ it('Exceptions', function () { Color(''); }, /Unable to parse color from string/); }); + +it('Should parse alphas in RGBA hex notation correctly', function () { + // Tests for regression of #174 + notStrictEqual( + Color('#000000ab').alpha(), + Color('#000000aa').alpha() + ); +});