Skip to content

Extended mocha testing, with file based snippets, test parallelism, and test dependancy.

Notifications You must be signed in to change notification settings

acodeninja/syrup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

syrup

Build Status

tl;dw

Write a test

describe('Array', function() {
    describe('#indexOf()', function() {
        it('should return -1 when the value is not present', function() {
            Assert.equal(-1, [1,2,3].indexOf(4));
        });
    });
});

Setup and register a scenario for your test

require('syrup').debug().scenario(
    'example:arrays',
    {
        entrypoint: `${__dirname}/test_array.js`
    }
);

Run the scenario

$ node start.js
[syrup:started] {"scenarios":["example:arrays"],"config":{}}
[example:arrays][scenario:started]
[example:arrays][worker:started]
[example:arrays][mocha:test] should return -1 when the value is not present
[example:arrays][mocha:pass] should return -1 when the value is not present
[example:arrays][worker:finished]
[example:arrays][scenario:finished]
[syrup:finished]
$ _

Examples

You will find a full set of examples in the ./examples folder. The basic example folder has a fully bootstrapped setup for use on the command line. Feel free to copy this set up for your own projects.

You can run the test setup like this:

$ node examples/basic/start.js --progress --report --debug --config ./examples/basic/config.yaml

This will output debug information, progress updates and the final report for you run. In addition it will load the config.yaml file for use in your scenarios and for the globals inside each worker.

Browserstack Local

Download the browserstack local binary for your flavour:

https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-linux-x64 https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-linux-ia32 https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-darwin-x64 https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal.exe

And run it

$ ./BrowserStackLocal-linux-x64 --key xxxxxxxxxxxxxxxxx

Then run your tests

About

Extended mocha testing, with file based snippets, test parallelism, and test dependancy.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •