Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for running tests #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,26 @@ Mongo errors are passed back directly. Additional error codes:
* 5103 -- Missing ops from requested version
* 5104 -- Failed to parse query

## Running tests

This is a database adapter for ShareDB, so all tests in this repo are
integration tests, requiring a running database. You can run one using Docker.

```shell
# In one terminal, run a Docker container for Mongo on port 27107.
# The `--rm` means the container cleans itself up after being stopped.

docker run --rm -p 27017:27017 mongo:latest

# In another terminal, run the integration tests:

npm test

# Ctrl+C to stop the Docker container after you're done with it.
```

In place of the `latest` tag, you can use a specific version tag like `4.0`.
See available tags here: https://hub.docker.com/_/mongo#shared-tags

## MIT License
Copyright (c) 2015 by Joseph Gentle and Nate Smith
Expand Down