Skip to content

Commit

Permalink
pubsub: pass back messageId as string (#2672)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop authored and stephenplusplus committed Oct 14, 2017
1 parent 9ecca41 commit 7a6dc45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/pubsub/src/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Publisher.prototype.queue_ = function(data, attrs, callback) {
* All async methods (except for streams) will return a Promise in the event
* that a callback is omitted.
*/
common.util.promisifyAll(Publisher);
common.util.promisifyAll(Publisher, {
singular: true
});

module.exports = Publisher;
3 changes: 2 additions & 1 deletion packages/pubsub/test/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ var proxyquire = require('proxyquire');

var promisified = false;
var fakeUtil = extend({}, common.util, {
promisifyAll: function(Class) {
promisifyAll: function(Class, options) {
if (Class.name === 'Publisher') {
assert.deepEqual(options, { singular: true });
promisified = true;
}
}
Expand Down

0 comments on commit 7a6dc45

Please sign in to comment.