test(settings): add unit test for the settings validator assertType function for test cases that should throw an error

This commit is contained in:
2026-06-04 14:02:09 +02:00
parent 751b2663b3
commit e0419d57cc
@@ -39,6 +39,29 @@ describe('assertType', () => {
])('throws no error for the value %s', ([ value ]) => {
expect(() => assertType(value)).not.throw(Error);
});
test.for([
[''],
[' '],
[' '],
[' '],
['42'],
['0'],
['-42'],
['-42.0'],
['-0.0'],
['a'],
['ab'],
['SeekraIsGreat!'],
['Seekra is great!'],
[undefined],
[null]
])('throws an error for the value %s', ([ value ]) => {
expect(() => assertType(value)).throw(Error);
});
});
describe('assertString', () => {