Skip to content

Instantly share code, notes, and snippets.

@hatelove
Created November 5, 2014 02:37
Show Gist options
  • Save hatelove/883102ca33ef986acbed to your computer and use it in GitHub Desktop.
Save hatelove/883102ca33ef986acbed to your computer and use it in GitHub Desktop.
this.Then(/^item info - "([^"]+)" should match/, function(key, next) {
itemPage.getInfo(key).then(
function(data) {
//data: {info, pattern}
expect(data.pattern.test(data.info), 'itemInfo match error').to.be.true;
}
).then(next, next);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment