Skip to content

Commit f9b555a

Browse files
committed
lint fixes
1 parent 4c28587 commit f9b555a

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

packages/browser/test/profiling/UIProfiler.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import * as Sentry from '@sentry/browser';
6-
import { type Span, debug } from '@sentry/core';
7-
import { type Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
6+
import { debug,type Span } from '@sentry/core';
7+
import { afterEach, beforeEach, describe, expect, it, type Mock, vi } from 'vitest';
88
import type { BrowserOptions } from '../../src/index';
99

1010
function getBaseOptionsForTraceLifecycle(sendMock: Mock<any>, enableTracing = true): BrowserOptions {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { describe, expect, it } from 'vitest';
2+
import { envToBool } from '../src/index';
3+
4+
describe('envToBool backwards compatibility', () => {
5+
it('should be exported from @sentry/node-core for backwards compatibility', () => {
6+
expect(envToBool).toBeDefined();
7+
expect(typeof envToBool).toBe('function');
8+
});
9+
10+
it('should correctly parse boolean values', () => {
11+
expect(envToBool('true')).toBe(true);
12+
expect(envToBool('false')).toBe(false);
13+
expect(envToBool('1')).toBe(true);
14+
expect(envToBool('0')).toBe(false);
15+
});
16+
17+
it('should return null for invalid values in strict mode', () => {
18+
expect(envToBool('invalid', { strict: true })).toBe(null);
19+
expect(envToBool('', { strict: true })).toBe(null);
20+
});
21+
});

0 commit comments

Comments
 (0)