Skip to content

Commit a4e6425

Browse files
committed
add tests
1 parent 5515dd8 commit a4e6425

File tree

2 files changed

+154
-355
lines changed

2 files changed

+154
-355
lines changed

packages/core/src/integrations/inboundfilters.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';
2-
import { Event, Integration, StackFrame } from '@sentry/types';
1+
import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';
32
import { getEventDescription, isDebugBuild, isMatchingPattern, logger } from '@sentry/utils';
43

54
// "Script error." is hard coded into browsers for errors that it can't read.
65
// this is the result of a script being pulled in from an external domain and CORS.
76
const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];
87

98
/** JSDoc */
10-
interface InboundFiltersOptions {
9+
export interface InboundFiltersOptions {
1110
allowUrls: Array<string | RegExp>;
1211
denyUrls: Array<string | RegExp>;
1312
ignoreErrors: Array<string | RegExp>;
@@ -36,7 +35,7 @@ export class InboundFilters implements Integration {
3635
/**
3736
* @inheritDoc
3837
*/
39-
public setupOnce(): void {
38+
public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
4039
addGlobalEventProcessor((event: Event) => {
4140
const hub = getCurrentHub();
4241
if (hub) {
@@ -55,7 +54,7 @@ export class InboundFilters implements Integration {
5554

5655
/** JSDoc */
5756
export function _mergeOptions(
58-
intOptions: Partial<InboundFiltersOptions>,
57+
intOptions: Partial<InboundFiltersOptions> = {},
5958
clientOptions: Partial<InboundFiltersOptions> = {},
6059
): Partial<InboundFiltersOptions> {
6160
return {

0 commit comments

Comments
 (0)