Skip to content

Commit

Permalink
test: seed option of random generator
Browse files Browse the repository at this point in the history
closes #13
  • Loading branch information
mikaelol committed Sep 7, 2020
1 parent 92824fa commit 336ee3f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion __tests__/Tinycolor_tests.re
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,13 @@ describe("color utils", () => {

test("random() with options", () => {
let a =
TinyColor.random(~hue=`green, ~luminosity=`bright, ~alpha=0.85, ());
TinyColor.random(
~hue=`green,
~seed=719,
~luminosity=`bright,
~alpha=0.85,
(),
);

expect(TinyColor.getAlpha(a)) |> toBe(0.85);
});
Expand Down

0 comments on commit 336ee3f

Please sign in to comment.