🚨 Fix linting errors

This commit is contained in:
Rune Harlyk
2026-01-02 22:00:25 +01:00
parent 3c557b69a3
commit 21bd4fa837
32 changed files with 438 additions and 245 deletions
+34 -34
View File
@@ -1,44 +1,44 @@
import { describe, it, expect } from 'vitest';
import { toUint8, toInt8 } from '../../src/lib/utilities/math-utilities';
import { describe, it, expect } from 'vitest'
import { toUint8, toInt8 } from '../../src/lib/utilities/math-utilities'
describe('toUint8', () => {
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('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('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)
})
})
describe('toInt8', () => {
it('min interval value should get -128', () => {
expect(toInt8(-1, -1, 1)).toBe(-128);
});
it('middle interval value should get 0', () => {
expect(toInt8(0, -1, 1)).toBe(0);
});
it('min interval value should get -128', () => {
expect(toInt8(-1, -1, 1)).toBe(-128)
})
it('middle interval value should get 0', () => {
expect(toInt8(0, -1, 1)).toBe(0)
})
it('max interval value should get 127', () => {
expect(toInt8(1, -1, 1)).toBe(127);
});
it('max interval value should get 127', () => {
expect(toInt8(1, -1, 1)).toBe(127)
})
it('min value should be clamped', () => {
expect(toInt8(-2, -1, 1)).toBe(-128);
});
it('min value should be clamped', () => {
expect(toInt8(-2, -1, 1)).toBe(-128)
})
it('max value should be clamped', () => {
expect(toInt8(2, -1, 1)).toBe(127);
});
});
it('max value should be clamped', () => {
expect(toInt8(2, -1, 1)).toBe(127)
})
})