Giter Club home page Giter Club logo

express-testing-lab's Introduction

Express Testing Lab

Today, you will be adding automated testing to the Express API lab from last week. Please work off of this starter repo. You should have tests for each of the endpoints:

  • GET /gifs which will list out all gifs
  • GET /gifs/:id which will get a gif with a specific ID
  • POST /gifs which will add a new gif and return that new gif
  • PUT gifs/:id which will update a gif and return that gif
  • DELETE gifs/:id which will delete a gif

Your code should make sure that each endpoint returns what it is supposed to. Directions for setting up testing and implementing tests can be found in the Express Testing lesson.

Set Up

First, fork the express-testing-lab-starter repo. Then run the following commands from the root directory.

$ git clone [email protected]:your-fork/express-testing-lab-starter.git
$ npm install
$ nodemon
$ node db/seed.js

Make sure you have mongod running as well!

Bonus: Add Testing to your MEHN Lab

If you have time, look up how to test a non-JSON webpage endpoint. Add testing to your MEHN lab using your research! You could also convert your application to an API and add testing to it that way if you prefer.

express-testing-lab's People

Contributors

aspittel avatar

Watchers

Rixio Barrios avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.