test(settings): add unit test for the settings validator assertString function for test cases that should not throw an error
This commit is contained in:
1 parent
156b3b552c
commit
e0268b6e6c
1 file changed
+16
@@ -34,6 +34,22 @@ describe('assertType', () => {
|
||||
});
|
||||
|
||||
describe('assertString', () => {
|
||||
test.for([
|
||||
['a'],
|
||||
['b'],
|
||||
['ab'],
|
||||
|
||||
['0'],
|
||||
['42'],
|
||||
|
||||
['null'],
|
||||
['undefined'],
|
||||
|
||||
['()&%())']
|
||||
])('throws no error for the value %s', ([ value ]) => {
|
||||
expect(() => assertString(value)).not.throw(Error);
|
||||
});
|
||||
|
||||
test.for([
|
||||
[0],
|
||||
[1],
|
||||
|
||||
Reference in new issue
Block a user