Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.36 KB

File metadata and controls

28 lines (20 loc) · 1.36 KB

Testing Overview

We use Lab for unit testing, Travis and Codecov.

For information on how to set up Travis, please visit official docs

The testing is initialized by the npm test script. See full deatails in package.json.

The test folder structure:

├── elasticsearch                 # Selected tests for elasticsearch functions
├── fixtures                      # Test fixtures
├── redis                         # Selected tests for redis functions
└── handler.js                    # Unit and integration tests for
                                  # handlers and functions

The initializer for test is in initilize.js where we defined the localhost mapping for following types:

  • contacts
  • gmusers
  • gmclientusers
  • csv-list

The test script creates a copy of the users and a copy of the stages from real database each time it is run - see package-json

The main fixture used for most of the tests is fixture-js.json.