File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ describe('Sentry client SDK', () => {
2525 getGlobalScope ( ) . clear ( ) ;
2626 } ) ;
2727
28+ afterAll ( ( ) => {
29+ vi . restoreAllMocks ( ) ;
30+ } ) ;
31+
2832 it ( 'adds Astro metadata to the SDK options' , ( ) => {
2933 expect ( browserInit ) . not . toHaveBeenCalled ( ) ;
3034
Original file line number Diff line number Diff line change 11import { SDK_VERSION } from '@sentry/browser' ;
22import * as SentryBrowser from '@sentry/browser' ;
33
4- import { vi } from 'vitest' ;
4+ import { afterAll , vi } from 'vitest' ;
55import { init as solidInit } from '../src/sdk' ;
66
77const browserInit = vi . spyOn ( SentryBrowser , 'init' ) ;
@@ -11,6 +11,10 @@ describe('Initialize SolidJS SDk', () => {
1111 vi . clearAllMocks ( ) ;
1212 } ) ;
1313
14+ afterAll ( ( ) => {
15+ browserInit . mockRestore ( ) ;
16+ } ) ;
17+
1418 it ( 'has the correct metadata' , ( ) => {
1519 solidInit ( {
1620 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ describe('Initialize Svelte SDk', () => {
2020 vi . clearAllMocks ( ) ;
2121 } ) ;
2222
23+ afterAll ( ( ) => {
24+ browserInit . mockRestore ( ) ;
25+ } ) ;
26+
2327 it ( 'has the correct metadata' , ( ) => {
2428 svelteInit ( {
2529 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
@@ -80,6 +84,10 @@ describe('detectAndReportSvelteKit()', () => {
8084 passedEventProcessor = undefined ;
8185 } ) ;
8286
87+ afterAll ( ( ) => {
88+ addEventProcessor . mockRestore ( ) ;
89+ } ) ;
90+
8391 it ( 'registers an event processor' , async ( ) => {
8492 detectAndReportSvelteKit ( ) ;
8593
You can’t perform that action at this time.
0 commit comments