Skip to content

Commit

Permalink
add unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
harshasrikara committed Jul 12, 2020
1 parent 1d7fb47 commit 179db2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 12 additions & 9 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -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(<App />);
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();
});
});
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es6",
"lib": [
"dom",
"dom.iterable",
Expand All @@ -15,7 +15,6 @@
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
Expand Down

0 comments on commit 179db2c

Please sign in to comment.