From 179db2c11d61675d70a08c99d42fd320ef3493f2 Mon Sep 17 00:00:00 2001 From: Harsha Srikara Date: Sun, 12 Jul 2020 16:37:36 -0500 Subject: [PATCH] add unit testing --- src/App.test.tsx | 21 ++++++++++++--------- tsconfig.json | 3 +-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 4db7ebc..d7c92ae 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,9 +1,12 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - const { getByText } = render(); - const linkElement = getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); +// unit tests for env file +describe("env", () => { + it("should have an auth0 domain", () => { + expect(process.env.REACT_APP_AUTH0_DOMAIN).toBeDefined(); + }); + it("should have an auth0 clientID", () => { + expect(process.env.REACT_APP_AUTH0_CLIENTID).toBeDefined(); + }); + it("should have an auth0 audience", () => { + expect(process.env.REACT_APP_AUTH0_AUDIENCE).toBeDefined(); + }); +}); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f2850b7..c8398e6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "lib": [ "dom", "dom.iterable", @@ -15,7 +15,6 @@ "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, - "isolatedModules": true, "noEmit": true, "jsx": "react" },