mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-27 13:34:28 -04:00
test: fix expected error codes in multiple test
In the e2e tests the global filter must be added via the special provider 'APP_FILTER' and not with useGlobalFilters, because if not the filter breaks, because of the way supertest handles the http-connection. See: https://github.com/nestjs/nest/issues/1160#issuecomment-468698640 Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
796b8294cf
commit
6269c7f7bc
8 changed files with 15 additions and 9 deletions
|
@ -24,6 +24,7 @@ import customizationConfigMock from '../src/config/mock/customization.config.moc
|
|||
import externalServicesConfigMock from '../src/config/mock/external-services.config.mock';
|
||||
import mediaConfigMock from '../src/config/mock/media.config.mock';
|
||||
import noteConfigMock from '../src/config/mock/note.config.mock';
|
||||
import { ErrorExceptionMapping } from '../src/errors/error-mapping';
|
||||
import { FrontendConfigModule } from '../src/frontend-config/frontend-config.module';
|
||||
import { GroupsModule } from '../src/groups/groups.module';
|
||||
import { HistoryModule } from '../src/history/history.module';
|
||||
|
@ -129,6 +130,12 @@ export class TestSetupBuilder {
|
|||
FrontendConfigModule,
|
||||
IdentityModule,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: 'APP_FILTER',
|
||||
useClass: ErrorExceptionMapping,
|
||||
},
|
||||
],
|
||||
});
|
||||
return testSetupBuilder;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue