-/* 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');
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);
});
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);
});