eslint: Fix unicorn/no-zero-fractions.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-zero-fractions.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-07 02:54:18 -07:00
committed by Tim Abbott
parent 0d4af4f8e7
commit 78ccb15d9e
2 changed files with 3 additions and 3 deletions

View File

@@ -4,11 +4,11 @@ zrequire("colorspace");
run_test("sRGB_to_linear", () => {
let srgb_color = 0.0042;
let expected_value = 0.0042 / 255.0 / 12.92;
let expected_value = 0.0042 / 255 / 12.92;
let actual_value = colorspace.sRGB_to_linear(srgb_color);
assert.equal(actual_value, expected_value);
srgb_color = 255.0;
srgb_color = 255;
expected_value = 1;
actual_value = colorspace.sRGB_to_linear(srgb_color);
assert.equal(actual_value, expected_value);