Giter VIP home page Giter VIP logo

node-testing2-project's Introduction

Server Testing Module Project

Instructions

Minimum Viable Product

For this project you will create a RESTful API using Node and Express, containing endpoints to perform some CRUD operations on a resource of your choosing. Two or three endpoints are enough. Data should be persisted in a SQLite database.

Requirements

  • Write a minimum of ten tests using supertest.

Checklist

Here is a checklist of tasks to help you put your project together:

  • Generate a .gitignore file.
  • Install express, [email protected], sqlite3 as plain dependencies.
  • Alternatively install express, knex, @vscode/sqlite3 as plain dependencies.
  • Install jest, eslint, nodemon, supertest, cross-env as dev-dependencies.
  • Configure jest and eslint using npx <libname> --init.
  • Create a knexfile.js with "development" and "testing" configurations.
  • Create a db-config.js file that selects the correct configuration using the value of process.env.NODE_ENV.
  • Create migration and seed files.
  • Put together "start", "server", "rollback", "migrate" and "seed" scripts in your package.json.
  • Create a "test" script in your package.json using cross-env to inject a NODE_ENV of "testing".
  • Create a basic express application with a few database access functions and a few endpoints.
  • Test your endpoints manually using Postman, HTTPie or similar.
  • Test your endpoints with supertest.

node-testing2-project's People

Contributors

luishrd avatar ladrillo avatar sunjieming avatar mixelpixel avatar dependabot[bot] 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.