A small REST API for an imaginary todo app called "todoman"
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test-helpers
.eslintrc
.gitignore
LICENSE
README.md
package.json
yarn.lock

README.md

tutorial-rest-api-integration-testing-node-js

This repository contains the code to follow along with my tutorial on writing integration tests for REST APIs.

Built on Top of These Core Libraries:

  • express
  • mocha
  • chai

Endpoints

  • POST /todos - To create a todo
  • GET /todos - To list all todos
  • PATCH /todos/:todoId - To update a todo

Directory Structure

src/
  errors/
    ValidationError.js
    ResourceNotFoundError.js
  todos/
    __http-tests__
      create-todo.test.js
      list-todos.test.js
      patch-todo.test.js
    routes.js
    TodosService.js
  main.js
test-helpers/
  test-db.js
  test-server.js
package.json
yarn.lock