From 70531b202d065f366cf5f9f65b27d20abff13a54 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung Date: Wed, 20 Sep 2023 22:56:18 -0400 Subject: [PATCH] Clean up --- packages/app-store/_test/docker-compose.yml | 15 --------- packages/app-store/_test/helpers/setenv.sh | 8 ----- packages/app-store/_test/run-integration.sh | 5 --- packages/app-store/_test/tests.test.ts | 32 ------------------- .../_test/vitest.config.integration.ts | 11 ------- 5 files changed, 71 deletions(-) delete mode 100644 packages/app-store/_test/docker-compose.yml delete mode 100644 packages/app-store/_test/helpers/setenv.sh delete mode 100644 packages/app-store/_test/run-integration.sh delete mode 100644 packages/app-store/_test/tests.test.ts delete mode 100644 packages/app-store/_test/vitest.config.integration.ts diff --git a/packages/app-store/_test/docker-compose.yml b/packages/app-store/_test/docker-compose.yml deleted file mode 100644 index 661e7609a0..0000000000 --- a/packages/app-store/_test/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Set the version of docker compose to use -version: "3.9" - -# The containers that compose the project -services: - db: - image: postgres:13 - restart: always - container_name: integration-tests-prisma - ports: - - "5433:5432" - environment: - POSTGRES_USER: prisma - POSTGRES_PASSWORD: prisma - POSTGRES_DB: tests diff --git a/packages/app-store/_test/helpers/setenv.sh b/packages/app-store/_test/helpers/setenv.sh deleted file mode 100644 index 4fdae95ed4..0000000000 --- a/packages/app-store/_test/helpers/setenv.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -# scripts/setenv.sh - - -# Export env vars - -export $(grep -v '^#' .env | xargs) \ No newline at end of file diff --git a/packages/app-store/_test/run-integration.sh b/packages/app-store/_test/run-integration.sh deleted file mode 100644 index bdd3335857..0000000000 --- a/packages/app-store/_test/run-integration.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -DIR="$(cd "$(dirname "$0")" && pwd)" - -source $DIR/setenv.sh diff --git a/packages/app-store/_test/tests.test.ts b/packages/app-store/_test/tests.test.ts deleted file mode 100644 index c2ba4b1194..0000000000 --- a/packages/app-store/_test/tests.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import prisma from "@calcom/prisma" -import { createMocks } from "node-mocks-http"; -import type { CustomNextApiRequest, CustomNextApiResponse } from "@calcom/lib/test/types"; -import dayjs from "@calcom/dayjs"; -import { default as handleNewBooking } from "@calcom/features/bookings/lib/handleNewBooking"; - - -test("API call to handleNewBooking", async () => { - const { req, res } = createMocks({ - method: "POST", - body: { - name: "test", - start: dayjs().add(1, "hour").format(), - end: dayjs().add(1, "day").format(), - eventTypeId: 3, - email: "test@example.com", - location: "Cal.com Video", - timeZone: "America/Montevideo", - language: "en", - customInputs: [], - metadata: {}, - userId: 4, - }, - userId: 4, - prisma, - }); - - await handleNewBooking(req, res); - console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) }); - - // expect(prismaMock.booking.create).toHaveBeenCalledTimes(1); - }) diff --git a/packages/app-store/_test/vitest.config.integration.ts b/packages/app-store/_test/vitest.config.integration.ts deleted file mode 100644 index f396af36b4..0000000000 --- a/packages/app-store/_test/vitest.config.integration.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defineConfig } from "vitest/config"; - -export default defineConfig({ - test: { - // clearMocks: true, - // cache: false, - coverage: { - provider: "v8", - }, - }, -});