Skip to content

Releases: fullstackers/stairs

Dependency Updates

02 Oct 15:51
Compare
Choose a tag to compare

Updated dependencies

Conditional Steps

07 Aug 17:35
Compare
Choose a tag to compare

Stairs#step(title:String, exclude:Boolean, fn:Function)

Conditionally adds a step.

s.step('query api', options.skipQuery, function ($, next) {
  http.get($.url, function (res) {
    $.body = '';
    res.on('data', function (chunk) { $.body = $.body + chunk; });
    res.on('end', next);
    res.on('error', next);
  });
});

The "query api" step will not be added if options.skipQuery is true.

API Update

28 Jul 18:02
Compare
Choose a tag to compare

The API has two new methods bound to the context of each handler

next() and end();

s.step('some step', function ($) {
  $.data = 'Some Data';
  this.next()
});
s.step('some other step', function ($) {
  console.log('finished!'); 
  this.end();
});