Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit b0b26ad

Browse files
author
Benjamin E. Coe
authored
fix(docs): snippets are now replaced in jsdoc comments (#815)
1 parent d2af83b commit b0b26ad

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

.jsdoc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ module.exports = {
2626
destination: './docs/'
2727
},
2828
plugins: [
29-
'plugins/markdown'
29+
'plugins/markdown',
30+
'jsdoc-region-tag'
3031
],
3132
source: {
3233
excludePattern: '(^|\\/|\\\\)[._]',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
"intelli-espower-loader": "^1.0.1",
9292
"jsdoc": "^3.6.2",
9393
"jsdoc-fresh": "^1.0.1",
94+
"jsdoc-region-tag": "^1.0.2",
9495
"linkinator": "^1.5.0",
9596
"mkdirp": "^0.5.1",
9697
"mocha": "^6.0.0",

system-test/pubsub.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -710,23 +710,22 @@ describe('pubsub', () => {
710710
describe('seeking', () => {
711711
let subscription: Subscription;
712712
let messageId: string;
713+
const snapshotName = generateSnapshotName();
713714

714-
beforeEach(() => {
715+
beforeEach(async () => {
715716
subscription = topic.subscription(generateSubName());
716-
717-
return subscription
718-
.create()
719-
.then(() => {
720-
return topic.publish(Buffer.from('Hello, world!'));
721-
})
722-
.then(_messageId => {
723-
messageId = _messageId;
724-
});
717+
await subscription.create();
718+
messageId = await topic.publish(Buffer.from('Hello, world!'));
719+
// The first call to `createSnapshot` consistently fails,
720+
// see: https://github.com/googleapis/nodejs-pubsub/issues/821
721+
try {
722+
await subscription.createSnapshot(snapshotName);
723+
} catch (err) {
724+
console.warn(err.message);
725+
}
725726
});
726727

727728
it('should seek to a snapshot', done => {
728-
const snapshotName = generateSnapshotName();
729-
730729
subscription.createSnapshot(snapshotName, (err, snapshot) => {
731730
assert.ifError(err);
732731

0 commit comments

Comments
 (0)