mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
Add test Common/Types/JSON
This commit is contained in:
parent
f0dfb71170
commit
f5dd56b98c
38
Common/Tests/Types/JSON.test.ts
Normal file
38
Common/Tests/Types/JSON.test.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import { ObjectType } from '../../Types/JSON';
|
||||
|
||||
describe('ObjectType', () => {
|
||||
const expectedFields: Array<keyof typeof ObjectType> = [
|
||||
'ObjectID',
|
||||
'Name',
|
||||
'EqualToOrNull',
|
||||
'NotEqual',
|
||||
'Email',
|
||||
'Phone',
|
||||
'Color',
|
||||
'Domain',
|
||||
'Version',
|
||||
'Route',
|
||||
'URL',
|
||||
'Permission',
|
||||
'Search',
|
||||
'GreaterThan',
|
||||
'GreaterThanOrEqual',
|
||||
'LessThan',
|
||||
'LessThanOrEqual',
|
||||
'Port',
|
||||
'Hostname',
|
||||
'HashedString',
|
||||
'DateTime',
|
||||
'Buffer',
|
||||
'InBetween',
|
||||
'NotNull',
|
||||
'IsNull',
|
||||
];
|
||||
|
||||
test.each(expectedFields)(
|
||||
'ObjectType has %s',
|
||||
(field: keyof typeof ObjectType) => {
|
||||
expect(ObjectType[field]).toBe(field);
|
||||
}
|
||||
);
|
||||
});
|
Loading…
Reference in New Issue
Block a user