fix: corrige erros do ESLint e configura variáveis globais
- Adiciona variáveis globais do Node.js (process, console, __dirname, require, module, exports) - Adiciona variáveis globais do Jest (describe, it, beforeEach, fail, etc.) - Configura ESLint para arquivos JavaScript de configuração - Remove diretivas eslint-disable não utilizadas - Corrige variáveis não usadas prefixando com _ - Ajusta regras do ESLint para ignorar variáveis que começam com _ - Formata código com Prettier
This commit is contained in:
@@ -81,10 +81,7 @@ describe('DebService', () => {
|
||||
|
||||
context.mockRepository.findByCpfCgcent.mockResolvedValue(mockDebs);
|
||||
|
||||
const result = await context.service.findByCpfCgcent(
|
||||
'12345678900',
|
||||
1498,
|
||||
);
|
||||
const result = await context.service.findByCpfCgcent('12345678900', 1498);
|
||||
|
||||
expect(result).toHaveLength(1);
|
||||
expect(context.mockRepository.findByCpfCgcent).toHaveBeenCalledWith(
|
||||
@@ -178,9 +175,7 @@ describe('DebService', () => {
|
||||
|
||||
it('deve propagar erro do repositório', async () => {
|
||||
const repositoryError = new Error('Database connection failed');
|
||||
context.mockRepository.findByCpfCgcent.mockRejectedValue(
|
||||
repositoryError,
|
||||
);
|
||||
context.mockRepository.findByCpfCgcent.mockRejectedValue(repositoryError);
|
||||
|
||||
await expect(
|
||||
context.service.findByCpfCgcent('12345678900'),
|
||||
@@ -188,4 +183,3 @@ describe('DebService', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user