mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: update unit tests
This commit is contained in:
@@ -170,7 +170,10 @@ describe('BlockService', () => {
|
||||
jest.spyOn(blockRepository, 'findOneAndPopulate');
|
||||
const result = await blockService.findOneAndPopulate(block.id);
|
||||
|
||||
expect(blockRepository.findOneAndPopulate).toHaveBeenCalledWith(block.id);
|
||||
expect(blockRepository.findOneAndPopulate).toHaveBeenCalledWith(
|
||||
block.id,
|
||||
undefined,
|
||||
);
|
||||
expect(result).toEqualPayload({
|
||||
...blockFixtures.find(({ name }) => name === 'hasNextBlocks'),
|
||||
category,
|
||||
@@ -196,6 +199,7 @@ describe('BlockService', () => {
|
||||
expect(blockRepository.findAndPopulate).toHaveBeenCalledWith(
|
||||
{},
|
||||
undefined,
|
||||
undefined,
|
||||
);
|
||||
expect(result).toEqualPayload(blocksWithCategory);
|
||||
});
|
||||
|
||||
@@ -113,6 +113,7 @@ describe('MessageService', () => {
|
||||
|
||||
expect(messageRepository.findOneAndPopulate).toHaveBeenCalledWith(
|
||||
message.id,
|
||||
undefined,
|
||||
);
|
||||
expect(result).toEqualPayload({
|
||||
...messageFixtures.find(({ mid }) => mid === message.mid),
|
||||
|
||||
Reference in New Issue
Block a user