Clear Inputs and Outputs

Sumit Rawal answered on August 25, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • flutter clear all text in textfield
  • streamlit clear text input
  • html input clear history
  • python selenium clear input
  • clear textbox winform
  • flutter textformfield clear value
  • clear textbox
  • C# clear console input buffer
  • selenium clear input doesn't work
  • input clear
  • add clear button to text input
  • how to clear an input in testing library
  • How do I clear inpput area after I press enter
  • clear input fild
  • angular clear input
  • add clear button to text input
  • how to stop clear input new input system unity
  • how to clear the consol after input java
  • linux clear command line input
  • clear search input box history
  • C is not clearing the data in the TextInput

  • Clear Inputs and Outputs

    0

    Same for when you have clear inputs and outputs. If you are writing a currency formatting function, and you know that formatCurrency(3.50, 'USD') should result in $3.50 , then go write your tests first!

    Think of all the weird input you could get and how would you handle it. What if your method was called with missing arguments, like formatCurrency() ? What if a string was passed instead of a number, like formatCurrency('sorry', 'CAD') ? How would you handle those cases? What would your method do? Return undefined or null? Throw an error?

    Writing your tests upfront allows you to think about all those edge cases and then helps you write your function so that it behaves properly. 

    Popularity 1/10 Helpfulness 1/10 Language typescript
    Source: Grepper
    Tags: typescript
    Link to this answer
    Share Copy Link
    Contributed on Aug 25 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.