Skip to content

sirishasamudrala5/react-typescript-testcases-typechecking

Repository files navigation

React TypeScript Testing-Library Interview

Installation

Clone and install Yarn dependencies:

$ git clone git@github.com:taj-averylane/react-typescript-testinglibrary-interview.git
$ cd react-typescript-testinglibrary-interview
$ yarn

Running Tests

See package.json

Tasks

Task 1 - Done!

Complete the tests with testing-library inside Home.test.tsx, About.test.tsx, and LayoutContainer.test.tsx.

Each file has tests that are empty. Fill each test out to match what is expected.

Run yarn test to test.

Task 2 - Done!

Inside of reducers/sample.ts, you will see type SampleAction = unknown.

Fix this type to be specific to the actions available. Please make the type as accurate as possible.

Run yarn typecheck to test.

Submitting

Push your code to some git repository that is public. For example, you can use GitHub or Gitlab.