Skip to content

Commit

Permalink
test(debuh): add error debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Nov 17, 2024
1 parent da45e11 commit 209e56c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/integration/endpoints/fetch_messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ describe('fetch messages endpoints', () => {
const messageTimetokens = messages.map((message) => message.timetoken);

pubnub.fetchMessages({ channels: [channel], includeCustomMessageType: true }, (status, response) => {
assert(status.error === false);
if (status.error) console.error(`Fetch messages error: ${JSON.stringify(status.errorData)}`);
assert.equal(status.error, false);

try {
assert.equal(status.error, false);
Expand Down
1 change: 1 addition & 0 deletions test/integration/endpoints/publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe('publish endpoints', () => {
pubnub.publish({ message: { such: 'object' }, channel: 'ch1', storeInHistory: false }, (status, response) => {
try {
assert.equal(status.error, false);
if (status.error) console.error(`Message publish error: ${JSON.stringify(status.errorData)}`);
assert(response !== null);
assert.deepEqual(response.timetoken, '14647523059145592');
assert.equal(scope.isDone(), true);
Expand Down

0 comments on commit 209e56c

Please sign in to comment.