From 62518c72de9178787b4f40f0bb27a79638842ea4 Mon Sep 17 00:00:00 2001 From: hxtree Date: Wed, 1 Nov 2023 04:57:33 +0000 Subject: [PATCH] chore: remove dead code Signed-off-by: hxtree --- .../src/__tests__/get-schemas.test.ts | 32 ------------------- libraries/faker-factory/src/get-schemas.ts | 6 ---- 2 files changed, 38 deletions(-) delete mode 100644 libraries/faker-factory/src/__tests__/get-schemas.test.ts delete mode 100644 libraries/faker-factory/src/get-schemas.ts diff --git a/libraries/faker-factory/src/__tests__/get-schemas.test.ts b/libraries/faker-factory/src/__tests__/get-schemas.test.ts deleted file mode 100644 index a0d72987..00000000 --- a/libraries/faker-factory/src/__tests__/get-schemas.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { IsDiceNotation } from '@cats-cradle/validation-schemas'; -import { getSchemas } from '../get-schemas'; - -describe('getSchemas', () => { - let testClass: TestClass; - - class TestClass { - @IsDiceNotation() - public property: string; - } - - beforeEach(async () => { - testClass = new TestClass(); - }); - - it('should get accurate pattern for schemas', async () => { - const schemas = getSchemas(); - - expect(schemas).toMatchObject({ - TestClass: { - properties: { - property: { - pattern: /(\d+)?d(\d+)([+-]\d+)?/, - type: 'string', - }, - }, - type: 'object', - required: ['property'], - }, - }); - }); -}); diff --git a/libraries/faker-factory/src/get-schemas.ts b/libraries/faker-factory/src/get-schemas.ts deleted file mode 100644 index 9ade1f64..00000000 --- a/libraries/faker-factory/src/get-schemas.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { validationMetadatasToSchemas } from 'class-validator-jsonschema'; -import { SchemaObject } from 'openapi3-ts'; - -export function getSchemas(): Record { - return validationMetadatasToSchemas(); -}