Giter VIP home page Giter VIP logo

course-testing's Introduction

RN Testing Lectures

This repository holds the examples that will be used in all 3 RN Testing Lectures as well as the practice exercises that will be presented at the end of each lecture as asynchronous material.

Lecture #1: Testing with Jest

  • Summary of the 3 lectures
  • Brief explanation of what Jest is and what is used for
  • How to approach a test
  • Live practical testing examples on utils used in a real project
  • How to view and interpret coverage
  • Sharing & explaining asynchronous material

Lecture #2: Testing Redux

  • Q&A: Lecture #1 asynchronous material
  • Introduction to MSW and asynchronous actions testing
  • Brief explanation of the utils (getMockStore and getMockState) we use and what problems they solve
  • Live practical examples of a reducer test
  • Live practical examples of an action test
  • Brief explanation of how to mock an API call with MSW
  • Live practical examples of an asynchronous action test with a mocked API
  • Sharing & explaining asynchronous material

Lecture #3: Testing React Native Components

  • Q&A: Lecture #2 asynchronous material
  • Introduction to RTL
  • Live practical examples of a simple component test
  • Live practical examples of a component test with Redux
  • Sharing & explaining asynchronous material

Where to find the material

  • First, checkout to the corresponding branch for the class you are taking

Class 1 (clase-1/exercises)

  • Navigate to packages/lib/utils/exercises

Class 2 (clase-2/exercises)

  • Navigate to packages/mobile/src/redux/modules/users/userReducers.test.ts
  • Go to the end of the file & you should see an incomplete test for you to finish
  • Navigate to packages/mobile/src/redux/modules/users/actions/exercises
  • In that folder there should be two actions that are missing tests, go ahead and write them!
  • Navigate to packages/mobile/src/redux/modules/todos
  • This redux module has 0% of coverage. Add test to reducers, actions and selectors. Remember to add new handlers in packages/mobile/src/mocks/handlers.ts for the API calls!

Note: you can see the examples of class 2 if you feel lost

Class 3 (clase-1/exercises)

  • TBD

Workflow

Participants will have to fork this repo in order to publish their own asynchronous material solutions in the form of a PR, each class will have their own separate branches each already created. This is meant to be a way to keep track of each student's work and keep the repo tidy and reusable for future lectures.

course-testing's People

Contributors

matiasvaz93 avatar raschettilucia-rr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.