Skip to content

Commit

Permalink
bump color-string and add regression test for #174 (fixes #174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Oct 9, 2020
1 parent e1e735e commit d78959c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
});

0 comments on commit d78959c

Please sign in to comment.