Skip to content

Instantly share code, notes, and snippets.

@galderz
Created February 23, 2016 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save galderz/c349d3aa64a39684d7d7 to your computer and use it in GitHub Desktop.
Save galderz/c349d3aa64a39684d7d7 to your computer and use it in GitHub Desktop.
var before = client.stats().then(function(beforeStats) { return beforeStats } );
var put = before.then(function() { return client.put('k', 'v'); });
var after = put.then(function() { return client.stats(); });
Promise.all([before, after]).then(function(results) {
// results is an array of 2 elements, with the stats before and stats after
expect(results[1].stores).toBe(results[0].stores + 1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment