README.md

Test Instructions

Datastore tests are defined in shared/datastore/test/*.yaml and are implemented using interfaces defined in shared/datastore/test/**/*.js and controller/drivers/lib/datastore/spec/**/*.rb.

# Ruby Datastore tests
cd controller/drivers/lib/datastore
bundle exec rspec -f d spec/**/*.rb

# Javascript Datastore tests
cd shared/datastore/test
mocha test/**/*.js # mocha is a global dependancy

The structure of the yaml file may vary from test to test, though a QC process is ongoing. Generally:

FILE_NAME:
  '#FUNCTION_NAME': # contains an array of objects that represent the test
    - label: 'SHOULD be a label using rfc 2119 terminology'
      calls: [] # can be plural or singular, and may vary between tests
      expectation: [[], {}] # can be plural or singular, and may vary between tests
    - label: 'SHOULD be a label using rfc 2119 terminology'
      calls: [] # can be plural or singular, and may vary between tests
      expectation: [[], {}] # can be plural or singular, and may vary between tests