From f5dd56b98ced93e7b766d127da7a7c435ccca9ab Mon Sep 17 00:00:00 2001 From: aphilas <31406314+aphilas@users.noreply.github.com> Date: Sat, 8 Apr 2023 15:38:36 +0300 Subject: [PATCH] Add test Common/Types/JSON --- Common/Tests/Types/JSON.test.ts | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Common/Tests/Types/JSON.test.ts diff --git a/Common/Tests/Types/JSON.test.ts b/Common/Tests/Types/JSON.test.ts new file mode 100644 index 0000000000..f4a4e38379 --- /dev/null +++ b/Common/Tests/Types/JSON.test.ts @@ -0,0 +1,38 @@ +import { ObjectType } from '../../Types/JSON'; + +describe('ObjectType', () => { + const expectedFields: Array = [ + '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); + } + ); +});