Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C covid19india-react
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • covid19india
  • covid19india-react
  • Merge requests
  • !356

#355 Initial Test Setup

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/tannakartikey/tests into master Mar 29, 2020
  • Overview 10
  • Commits 6
  • Pipelines 0
  • Changes 14

Created by: tannakartikey

Following things are included in this PR:

  • Tests setup and configuration
  • A spec to calculate Level component.
  • A spec that downloads state data from API and then compares the data with the map files (public/maps/*) and reports discrepancy if any. It fails on the first error it finds instead of reporting errors in all the states. This limitation is due to https://github.com/facebook/jest/issues/1619
  • Another spec runs dynamically for each state against the static data downloaded from the API and extracted from the maps file. This test is helpful right now to see where the data has discrepancies. Once fixed we can get rid of this test
  • Under testUtils/index.js there are two functions that return an object with state names as keys and cities as values using the API and map files(public/maps/).
  • Some data cleaning. A few of the map files did not follow the convention the same as other files. Now they all follow the same standards for storing the cities data. For example, if the file name is gujarat.json then the cities will be found under gujarat_district property so on and so forth.

Command to run the specs: yarn test

Ref: #355 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tannakartikey/tests