cc-wong / react-demo

A simple webapp built with React JS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Demo

Wiki page: https://github.com/cc-wong/react-demo/wiki

A simple demo on building a webapp with React JS.

This app includes the following module(s):

  1. Sumo Tournament Schedule Lookup
    A lookup module for the Grand Sumo Tournament schedule in the current year and the next 10 years.
    • An API call is made to endpoint /getSumoHonbashoSchedule of the webservice from Python Webservice Demo. The year argument is provided by a dropdown field.
    • The JSON data returned by the API call is populated to the frontend.

See "Environments" in this repository's Wiki for more information on the instances of this webapp.

Development and testing

Reference:

Run locally

Run the following command at the project root:

npm start

Note

  1. Run npm install before starting the app for the first time.
  2. The automatic opening of the app on startup is disabled. Open it manually in a browser for development testing.

Unit testing

Default

npm test
  • Tests will be rerun whenever a file is updated.
  • See the Watch Usage on the screen for operation.

Run all tests

The command above runs only tests affected by updated modules by default.

To run all test cases from the start:

npm run testAll
  • Tests will be rerun whenever a file is updated.
  • See the Watch Usage on the screen for operation.

Get test coverage

npm run coverage

About

A simple webapp built with React JS.


Languages

Language:JavaScript 92.7%Language:CSS 5.7%Language:HTML 1.6%