mirror of
https://github.com/hexastack/hexabot
synced 2025-04-27 01:39:59 +00:00
fix: translation
This commit is contained in:
parent
fa8a433a64
commit
8707b861b4
@ -141,7 +141,9 @@ describe('TranslationController', () => {
|
||||
translationController = module.get<TranslationController>(
|
||||
TranslationController,
|
||||
);
|
||||
translation = await translationService.findOne({ str: 'Welcome' });
|
||||
translation = (await translationService.findOne({
|
||||
str: 'Welcome',
|
||||
})) as Translation;
|
||||
});
|
||||
|
||||
afterEach(jest.clearAllMocks);
|
||||
@ -164,7 +166,9 @@ describe('TranslationController', () => {
|
||||
|
||||
expect(translationService.findOne).toHaveBeenCalledWith(translation.id);
|
||||
expect(result).toEqualPayload(
|
||||
translationFixtures.find(({ str }) => str === translation.str),
|
||||
translationFixtures.find(
|
||||
({ str }) => str === translation.str,
|
||||
) as Translation,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -100,6 +100,7 @@ export class TranslationService extends BaseService<Translation> {
|
||||
}
|
||||
// Add fallback messages
|
||||
if (
|
||||
block.options &&
|
||||
'fallback' in block.options &&
|
||||
block.options.fallback &&
|
||||
'message' in block.options.fallback &&
|
||||
|
Loading…
Reference in New Issue
Block a user