Add test Common/Types/JSON

This commit is contained in:
aphilas 2023-04-08 15:38:36 +03:00
parent f0dfb71170
commit f5dd56b98c

View 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);
}
);
});