From cee40169f3337c145ea54319bc7e395f25d98745 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 30 Nov 2020 14:36:08 -0500 Subject: [PATCH] renames tests to js --- src/admin/components/forms/Form/context.ts | 10 +++++----- src/auth/{auth.spec.ts => auth.spec.js} | 0 .../resolvers/{resolvers.spec.ts => resolvers.spec.js} | 0 .../tests/{collections.spec.ts => collections.spec.js} | 0 src/collections/tests/{hooks.spec.ts => hooks.spec.js} | 0 .../{relationships.spec.ts => relationships.spec.js} | 0 .../tests/{uploads.spec.ts => uploads.spec.js} | 0 src/errors/{errors.spec.ts => errors.spec.js} | 0 .../{errorHandler.spec.ts => errorHandler.spec.js} | 0 .../{formatLabels.spec.ts => formatLabels.spec.js} | 0 10 files changed, 5 insertions(+), 5 deletions(-) rename src/auth/{auth.spec.ts => auth.spec.js} (100%) rename src/collections/graphql/resolvers/{resolvers.spec.ts => resolvers.spec.js} (100%) rename src/collections/tests/{collections.spec.ts => collections.spec.js} (100%) rename src/collections/tests/{hooks.spec.ts => hooks.spec.js} (100%) rename src/collections/tests/{relationships.spec.ts => relationships.spec.js} (100%) rename src/collections/tests/{uploads.spec.ts => uploads.spec.js} (100%) rename src/errors/{errors.spec.ts => errors.spec.js} (100%) rename src/express/middleware/{errorHandler.spec.ts => errorHandler.spec.js} (100%) rename src/utilities/{formatLabels.spec.ts => formatLabels.spec.js} (100%) diff --git a/src/admin/components/forms/Form/context.ts b/src/admin/components/forms/Form/context.ts index 390c4e8c79..46a256b678 100644 --- a/src/admin/components/forms/Form/context.ts +++ b/src/admin/components/forms/Form/context.ts @@ -1,14 +1,14 @@ import { createContext, useContext } from 'react'; -import { Context as FormContext } from './types'; +import { Context } from './types'; -const FormContext = createContext({} as FormContext); -const FormWatchContext = createContext({} as FormContext); +const FormContext = createContext({} as Context); +const FormWatchContext = createContext({} as Context); const SubmittedContext = createContext(false); const ProcessingContext = createContext(false); const ModifiedContext = createContext(false); -const useForm = (): FormContext => useContext(FormContext); -const useWatchForm = (): FormContext => useContext(FormWatchContext); +const useForm = (): Context => useContext(FormContext); +const useWatchForm = (): Context => useContext(FormWatchContext); const useFormSubmitted = (): boolean => useContext(SubmittedContext); const useFormProcessing = (): boolean => useContext(ProcessingContext); const useFormModified = (): boolean => useContext(ModifiedContext); diff --git a/src/auth/auth.spec.ts b/src/auth/auth.spec.js similarity index 100% rename from src/auth/auth.spec.ts rename to src/auth/auth.spec.js diff --git a/src/collections/graphql/resolvers/resolvers.spec.ts b/src/collections/graphql/resolvers/resolvers.spec.js similarity index 100% rename from src/collections/graphql/resolvers/resolvers.spec.ts rename to src/collections/graphql/resolvers/resolvers.spec.js diff --git a/src/collections/tests/collections.spec.ts b/src/collections/tests/collections.spec.js similarity index 100% rename from src/collections/tests/collections.spec.ts rename to src/collections/tests/collections.spec.js diff --git a/src/collections/tests/hooks.spec.ts b/src/collections/tests/hooks.spec.js similarity index 100% rename from src/collections/tests/hooks.spec.ts rename to src/collections/tests/hooks.spec.js diff --git a/src/collections/tests/relationships.spec.ts b/src/collections/tests/relationships.spec.js similarity index 100% rename from src/collections/tests/relationships.spec.ts rename to src/collections/tests/relationships.spec.js diff --git a/src/collections/tests/uploads.spec.ts b/src/collections/tests/uploads.spec.js similarity index 100% rename from src/collections/tests/uploads.spec.ts rename to src/collections/tests/uploads.spec.js diff --git a/src/errors/errors.spec.ts b/src/errors/errors.spec.js similarity index 100% rename from src/errors/errors.spec.ts rename to src/errors/errors.spec.js diff --git a/src/express/middleware/errorHandler.spec.ts b/src/express/middleware/errorHandler.spec.js similarity index 100% rename from src/express/middleware/errorHandler.spec.ts rename to src/express/middleware/errorHandler.spec.js diff --git a/src/utilities/formatLabels.spec.ts b/src/utilities/formatLabels.spec.js similarity index 100% rename from src/utilities/formatLabels.spec.ts rename to src/utilities/formatLabels.spec.js