Skip to content

ninezero90hy/react-calculator-mission

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mission to make a calculator with React

Netlify Status

image

Requirements

  • The initial value of the calculation result is 0
  • Addition is possible for two numbers
  • subtraction is possible for two numbers
  • multiplication is possible for two numbers
  • Division of two numbers is possible
  • Press the AC button to reset to 0
  • When expressing calculation results, the decimal point is rounded down if it exceeds 5 decimal places.
  • You can only enter up to 9 digits at a time.
  • Comma processing when showing calculation results

Test requirements

Everything in the requirements must pass the test

How to run the test

image

Excute test script in package.json

image

Select component testing

image

In Chrome, select start component testing. Choosing a different browser is optional

image

And then select the test you wrote and run it

image

Example

PR request

Fork the repository and edit it in your repository

  1. Consider whether a component has only one ‘role’ and ‘responsibility’, or whether a function does only one thing
  2. Commits also try to keep SRP
  3. Must write test code. However, the E2E test does not work currently due to a problem with the current version, so write it as a MOCK test.
  4. Prettier is set, so enable it and write the code.

reference