Skip to content

Vandhana-Mohan/8-0-error-handling-lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Error Handling Lab

A current set of functions correctly filters and calculates the total for all products between a range of prices. You need to add errors to some of the functions and handle those errors in others.

Getting started

  1. Fork and clone this repository.

  2. Navigate to the cloned repository's directory on your command line. Then, run the following command:

    npm install
    

    This will install the libraries needed to run the tests.

  3. Open up the repository in VSCode. Follow the instructions below to complete the Lab.

Instructions

Update the functions in index.js so they throw the errors as prescribed. Then, for the last function, handle those errors as described.

Tests

To run the tests, you can run the following command from the command line. You will need to be in the root directory of your repository.

npm test

This will run the test output once.

Test watcher

If you'd like, you can have the tests run constantly. This means that each time you save your file, your tests will re-run. To do so, you can run the following:

npm run watch

Follow the on-screen prompts to exit out of the constant runner.

Run file

If you want to manually test out your file, you can do so by running the following command.

node index.js

The output will be printed to your terminal.

About

9-3-Error-Handling-Lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%