11 lines
614 B
TypeScript
11 lines
614 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { adjustPixel } from "./exportArtboardPng";
|
|
import { neutralColorAdjustment } from "@core/adjustment-layer";
|
|
|
|
describe("adjustment pixel calculation", () => {
|
|
test("neutral adjustment is stable", () => expect(adjustPixel([20, 100, 220], neutralColorAdjustment)).toEqual([20, 100, 220]));
|
|
test("brightness, contrast, saturation and balance use deterministic ordering", () => {
|
|
expect(adjustPixel([100, 120, 140], { brightness: .1, contrast: .2, saturation: -.5, colorBalance: { red: .1, green: 0, blue: -.1 } })).toEqual([153, 150, 146]);
|
|
});
|
|
});
|