Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it(`/GET level`, async () => {
await request(app.getHttpServer())
.get('/level')
.expect(500);
expect(client.captureException.mock.calls[0][0]).toBeInstanceOf(Error);
expect(client.captureException.mock.calls[0][2]._level).toEqual(Sentry.Severity.Critical);
});
}))
extra() {
throw new Error('Something bad happened');
}
@Get('fingerprint')
@UseInterceptors(new RavenInterceptor({
fingerprint: ['A', 'B'],
}))
fingerprint() {
throw new Error('Something bad happened');
}
@Get('level')
@UseInterceptors(new RavenInterceptor({
level: Sentry.Severity.Critical,
}))
level() {
throw new Error('Something bad happened');
}
}