Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
title: 'modal.title_error',
}));
dispatch(historyPop());
});
const { enabled, level, sampleRate } = appConfig.sentry;
// Is not enabled
if (!enabled) {
return;
}
const severityMap = {
[Severity.Fatal]: SentrySeverity.Fatal,
[Severity.Error]: SentrySeverity.Error,
[Severity.Critical]: SentrySeverity.Critical,
[Severity.Warning]: SentrySeverity.Warning,
[Severity.Info]: SentrySeverity.Info,
[Severity.Debug]: SentrySeverity.Debug,
};
let trackedSeverities = Object.getOwnPropertySymbols(severityMap).map(s => severityMap[s]);
const minSeverityIndex = trackedSeverities.indexOf(level);
if (minSeverityIndex > -1) {
trackedSeverities = trackedSeverities.slice(0, minSeverityIndex + 1);
}
subscribe(appWillStart$, ({ getState }) => {
init({
dsn: 'https://1a444b262ac6405594ab33fb0102b377@sentry.io/1398210',
environment: env,
debug: env === 'development',
release: pckVersion,
test('should return the provided level', async function() {
Sentry.configureScope(scope => {
scope.setLevel(Severity.Warning)
Sentry.captureException(new Error('sentry test kit is awesome!'))
})
await waitForExpect(() => expect(testkit.reports()).toHaveLength(1))
expect(testkit.reports()[0].level).toEqual(Severity.Warning)
})
Sentry.configureScope(scope => {
scope.setLevel(Severity.Warning)
Sentry.captureException(new Error('sentry test kit is awesome!'))
})