🧹 Formats

This commit is contained in:
Rune Harlyk
2024-02-23 12:47:24 +01:00
parent 0421560603
commit 04c3603254
5 changed files with 74 additions and 74 deletions
+16 -16
View File
@@ -2,23 +2,23 @@ import { describe, it, expect } from 'vitest';
import { toUint8 } from '../../src/lib/utilities';
describe('toUint8', () => {
it('min interval value should get 0', () => {
expect(toUint8(-1, -1, 1)).toBe(0);
});
it('min interval value should get 0', () => {
expect(toUint8(-1, -1, 1)).toBe(0);
});
it('middle interval value should get 128', () => {
expect(toUint8(0, -1, 1)).toBe(128);
});
it('middle interval value should get 128', () => {
expect(toUint8(0, -1, 1)).toBe(128);
});
it('max interval value should get 255', () => {
expect(toUint8(1, -1, 1)).toBe(255);
});
it('max interval value should get 255', () => {
expect(toUint8(1, -1, 1)).toBe(255);
});
it('min value should be clamped', () => {
expect(toUint8(-2, -1, 1)).toBe(0);
});
it('min value should be clamped', () => {
expect(toUint8(-2, -1, 1)).toBe(0);
});
it('max value should be clamped', () => {
expect(toUint8(2, -1, 1)).toBe(255);
});
});
it('max value should be clamped', () => {
expect(toUint8(2, -1, 1)).toBe(255);
});
});