Skip to content

Conversation

@AureAle
Copy link

@AureAle AureAle commented Mar 20, 2021

Mini-Challenge 2: Intro to Testing

Answer the following questions first

1. Using create-react-app, what do we need to set up for testing?

  • Doesn't need set up, create the test files and make tests.

2. What components are worth testing in your development?

  • All of them

3. Can you apply TDD once you already created components?

  • yes

The Challenge

NOTE: Apply TDD as much as you can.

  1. Find any sub-routine, extract that logic into a separate file and test it out.
  2. Run test coverage and save results into a .txt file at ./ - root level. Can you make the total coverage to be above 60%?

Acceptance Criteria

  • Meaningful test cases were implemented for components and sub-routines logic.
  • All the test cases were successful.

Bonus Points

  • Test coverage is above 60%.

erickwize
erickwize previously approved these changes Mar 24, 2021
Copy link
Owner

@erickwize erickwize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

I can see you started to create some tests for the components using enzyme and it is ok, but we encourage you to use React Testing Library.
I have the same recommendation of creating the PR into your own Github repo so we can merge it when it is approved or done.
Also please add a file with the coverage of the tests for the following deliverables.

Acceptance Criteria

  • Meaningful test cases were implemented for components and sub-routines logic.
  • All the test cases were successful.
    image
    It failed only a snapshot (not a big deal - you can update it with the new UI)

Bonus Points

  • Test coverage is above 60%.

@erickwize erickwize dismissed their stale review March 24, 2021 06:46

I don't want to merge the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants