Coder Social home page Coder Social logo

node-tdd's Introduction

Coverage Status Build Status

TDD

NPM Module

  • mocha
  • supertest
  • should
  • SQLlite3

사용법

$ npm install
$ npm test

테스트 시나리오

  • Get /users
    • 성공시
      • 유저 객체를 담은 배열로 응답한다
      • 최대 limit 갯수만큼 응답한다.
    • 실패시
      • Limit이 숫자형이 아니면 400을 응답한다.
  • Get /users/:id
    • 성공시
      • id가 1인 유저 객챌르 반환한다.
    • 실패시
      • id가 숫자가 아닐 경우 400으로 응답한다.
      • id로 유저를 찾을수 없는 걍우 404로 응답한다.
  • DELETE /users/:id
    • 성공시
      • 204를 응답한다
    • 실패시
      • id가 숫자가 아닐경우 400으로 응답한다.
  • POST /users
    • 성공시
      • 생성된 유저 객체를 반환한다.
      • 입력한 name을 반환한다
    • 실패시
      • name 파라미테거 누락시 400을 반환한다.
      • name이 중복일 경우 4009를 반환한다.
  • PUT /users:id
    • 성공시
      • 변경된 name을 응답한다.
    • 실패시
      • 정수가아닌 id일 경우 400을 응답한다
      • name이 없을경우 400을 응답한다
      • 없는 유저일 경우 404을 응답한다.
      • 이름이 중복일 경우 409를 응답한다.

node-tdd's People

Contributors

cheese10yun avatar

Stargazers

 avatar

Watchers

 avatar  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.