Skip to content

Latest commit

 

History

History

test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Test cases

Build Status Coverage Status

This SDK uses jest for its testing suite. The tests are split up into unit tests, which verify the internal workings of the code and do not rely on a network connection, and integration tests, which verify the SDK against live instances of Watson services.

This repository includes scripts for running the tests. These scripts use the --silent and --verbose options.

To run a single test on its own or to run the tests with custom options, install jest globally.

$ npm install -g jest

Unit tests

$ npm run test-unit
    # or
$ jest test/unit/

Integration tests

$ npm run test-integration
    # or
$ jest test/integration/

Run a single test

# can be a path to any file or multiple files using globs and/or regular expressions
$ jest test/unit/baseService.test.js

Run all tests

$ npm test
    # or
$ jest test/