11import type { SentryVitePluginOptions } from '@sentry/vite-plugin' ;
22import { beforeEach , describe , expect , it , vi } from 'vitest' ;
3- import { _getUpdatedSourceMapSettings , makeEnableSourceMapsPlugin } from '../../src/vite/makeEnableSourceMapsPlugin' ;
3+ import { getUpdatedSourceMapSettings , makeEnableSourceMapsPlugin } from '../../src/vite/makeEnableSourceMapsPlugin' ;
44
55const mockedSentryVitePlugin = {
66 name : 'sentry-vite-debug-id-upload-plugin' ,
@@ -33,7 +33,7 @@ describe('makeEnableSourceMapsPlugin()', () => {
3333 } ) ;
3434} ) ;
3535
36- describe ( '_getUpdatedSourceMapSettings ' , ( ) => {
36+ describe ( 'getUpdatedSourceMapSettings ' , ( ) => {
3737 beforeEach ( ( ) => {
3838 vi . clearAllMocks ( ) ;
3939 vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => { } ) ;
@@ -42,7 +42,7 @@ describe('_getUpdatedSourceMapSettings', () => {
4242
4343 describe ( 'when sourcemap is false' , ( ) => {
4444 it ( 'should keep sourcemap as false and show warning' , ( ) => {
45- const result = _getUpdatedSourceMapSettings ( { build : { sourcemap : false } } ) ;
45+ const result = getUpdatedSourceMapSettings ( { build : { sourcemap : false } } ) ;
4646
4747 expect ( result ) . toBe ( false ) ;
4848 // eslint-disable-next-line no-console
@@ -58,7 +58,7 @@ describe('_getUpdatedSourceMapSettings', () => {
5858 [ 'inline' , 'inline' ] ,
5959 [ true , true ] ,
6060 ] as ( 'inline' | 'hidden' | boolean ) [ ] [ ] ) ( 'should keep sourcemap as %s when set to %s' , ( input , expected ) => {
61- const result = _getUpdatedSourceMapSettings ( { build : { sourcemap : input } } , { debug : true } ) ;
61+ const result = getUpdatedSourceMapSettings ( { build : { sourcemap : input } } , { debug : true } ) ;
6262
6363 expect ( result ) . toBe ( expected ) ;
6464 // eslint-disable-next-line no-console
@@ -72,7 +72,7 @@ describe('_getUpdatedSourceMapSettings', () => {
7272 it . each ( [ [ undefined ] , [ 'invalid' ] , [ 'something' ] , [ null ] ] ) (
7373 'should set sourcemap to hidden when value is %s' ,
7474 input => {
75- const result = _getUpdatedSourceMapSettings ( { build : { sourcemap : input as any } } ) ;
75+ const result = getUpdatedSourceMapSettings ( { build : { sourcemap : input as any } } ) ;
7676
7777 expect ( result ) . toBe ( 'hidden' ) ;
7878 // eslint-disable-next-line no-console
@@ -85,7 +85,7 @@ describe('_getUpdatedSourceMapSettings', () => {
8585 ) ;
8686
8787 it ( 'should set sourcemap to hidden when build config is empty' , ( ) => {
88- const result = _getUpdatedSourceMapSettings ( { } ) ;
88+ const result = getUpdatedSourceMapSettings ( { } ) ;
8989
9090 expect ( result ) . toBe ( 'hidden' ) ;
9191 // eslint-disable-next-line no-console
0 commit comments