Skip to content

Commit

Permalink
fix use of Severity in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Apr 11, 2022
1 parent ab8aa73 commit 13770bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/test/lib/base.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Hub, Scope, Session } from '@sentry/hub';
import { Event, Span, Transport } from '@sentry/types';
import { Event, Severity, Span, Transport } from '@sentry/types';
import { dsnToString, logger, SentryError, SyncPromise } from '@sentry/utils';

import * as integrationModule from '../../src/integration';
Expand Down Expand Up @@ -360,7 +360,7 @@ describe('BaseClient', () => {

client.captureMessage(
'test message',
'warning',
'warning' as Severity,
{
captureContext: {
extra: {
Expand Down
2 changes: 1 addition & 1 deletion packages/hub/test/scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ describe('Scope', () => {
contexts: { bar: { id: '3' }, baz: { id: '4' } },
extra: { bar: '3', baz: '4' },
fingerprint: ['bar'],
level: 'warning',
level: 'warning' as Severity,
tags: { bar: '3', baz: '4' },
user: { id: '42' },
requestSession: { status: 'errored' },
Expand Down
2 changes: 1 addition & 1 deletion packages/minimal/test/lib/minimal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('Minimal', () => {
getCurrentHub().bindClient(client);
const message = 'yo';
const level = 'warning';
captureMessage(message, level);
captureMessage(message, level as Severity);
expect(client.captureMessage.mock.calls[0][0]).toBe(message);
expect(client.captureMessage.mock.calls[0][1]).toBe('warning');
});
Expand Down

0 comments on commit 13770bf

Please sign in to comment.