File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function init(options: BrowserOptions): void {
24
24
25
25
/**
26
26
* Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,
27
- * in which case add SvelteKit an event.modules entry to outgoing events.
27
+ * in which case we add SvelteKit an event.modules entry to outgoing events.
28
28
* SvelteKit detection is performed only once, when the event processor is called for the
29
29
* first time. We cannot perform this check upfront (directly when init is called) because
30
30
* at this time, the HTML element might not yet be accessible.
@@ -52,7 +52,8 @@ export function detectAndReportSvelteKit(): void {
52
52
/**
53
53
* To actually detect a SvelteKit frontend, we search the DOM for a special
54
54
* div that's inserted by SvelteKit when the page is rendered. It's identifyed
55
- * by 'svelte-announcer' and used to improve page accessibility.
55
+ * by its id, 'svelte-announcer', and it's used to improve page accessibility.
56
+ * This div is not present when only using Svelte without SvelteKit.
56
57
*
57
58
* @see https://github.com/sveltejs/kit/issues/307 for more information
58
59
*/
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ addGlobalEventProcessorFunction.mockImplementation(proc => {
13
13
jest . mock ( '@sentry/browser' ) ;
14
14
15
15
describe ( 'Initialize Svelte SDk' , ( ) => {
16
- afterEach ( ( ) => {
16
+ afterAll ( ( ) => {
17
17
jest . clearAllMocks ( ) ;
18
18
} ) ;
19
19
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export function getLocationHref(): string {
124
124
}
125
125
126
126
/**
127
- * Gets a DOM element via document.querySelector.
127
+ * Gets a DOM element by using document.querySelector.
128
128
*
129
129
* This wrapper will first check for the existance of the function before
130
130
* actually calling it so that we don't have to take care of this check,
You can’t perform that action at this time.
0 commit comments