X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Fcommunication.js;h=69f0453c6278859f7140dfffd3b37d525f5d070f;hb=e23bda592175ae5ed772f366069ccfd2f60e1f70;hp=8be92414f6777c923991910d538a806684fe53ae;hpb=f7e70910f579079d04c4cbeff750c8721a51fbe6;p=websub-hub diff --git a/test/src/communication.js b/test/src/communication.js index 8be9241..69f0453 100644 --- a/test/src/communication.js +++ b/test/src/communication.js @@ -1,10 +1,7 @@ -/* eslint-env mocha */ -/* eslint-disable capitalized-comments, sonarjs/no-duplicate-string */ - 'use strict'; -const assert = require('assert'); -const sinon = require('sinon'); // eslint-disable-line node/no-unpublished-require +const assert = require('node:assert'); +const sinon = require('sinon'); const Communication = require('../../src/communication'); const Config = require('../../config'); @@ -709,14 +706,14 @@ describe('Communication', function () { it('covers claim', async function () { communication.db.topicFetchClaimById.resolves({ changes: 1, - }) + }); await communication.topicFetchClaimAndProcessById(dbCtx, topicId, requestId); assert(communication.topicFetchProcess.called); }); it('covers no claim', async function () { communication.db.topicFetchClaimById.resolves({ changes: 0, - }) + }); await communication.topicFetchClaimAndProcessById(dbCtx, topicId, requestId); assert(!communication.topicFetchProcess.called); }); @@ -733,14 +730,14 @@ describe('Communication', function () { it('covers claim', async function () { communication.db.verificationClaimById.resolves({ changes: 1, - }) + }); await communication.verificationClaimAndProcessById(dbCtx, verificationId, requestId); assert(communication.verificationProcess.called); }); it('covers no claim', async function () { communication.db.verificationClaimById.resolves({ changes: 0, - }) + }); await communication.verificationClaimAndProcessById(dbCtx, verificationId, requestId); assert(!communication.verificationProcess.called); });