Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Candia Flores committed Oct 16, 2024
1 parent c82b5e7 commit d1bd9af
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/bot/bot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { expect } = require('chai');
const proxyquire = require('proxyquire');

const { initialize } = require('../../bot');
const { User, Order, Config } = require('../../models');
const { User, Order } = require('../../models');
const { getCurrenciesWithPrice } = require('../../util');
const { mockUpdatesResponseForCurrencies } = require('./mocks/currenciesResponse');
const { mockUpdatesResponseForLanguages } = require('./mocks/languagesResponse');
Expand Down Expand Up @@ -235,7 +235,6 @@ describe('Bot Initialization', () => {

validateUserStub = sinon.stub().resolves();
startMessageStub = sinon.stub().resolves();
userMiddlewareStub = sinon.stub().resolves();
attemptPendingPaymentsStub = sinon.stub();

// Replace the real modules with the stubs
Expand Down Expand Up @@ -532,8 +531,8 @@ describe('Bot Initialization', () => {
message: ctx.update.message,
});

expect(ConfigStub.findOne.calledOnceWithExactly({ maintenance: true })).to.be.true;
expect(ctx.reply.calledOnceWithExactly('maintenance')).to.be.true;
expect(ConfigStub.findOne.calledOnceWithExactly({ maintenance: true })).to.be.equal(true);
expect(ctx.reply.calledOnceWithExactly('maintenance')).to.be.equal(true);
});

it('should handle text messages that are not commands using the second text handler', async () => {
Expand Down Expand Up @@ -588,7 +587,7 @@ describe('Bot Initialization', () => {
message: ctx.message,
});

expect(ctx.reply.calledOnce).to.be.true;
expect(ctx.reply.calledWithExactly('This is an unknown command.')).to.be.true;
expect(ctx.reply.calledOnce).to.be.equal(true);
expect(ctx.reply.calledWithExactly('This is an unknown command.')).to.be.equal(true);
});
});

0 comments on commit d1bd9af

Please sign in to comment.