File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed
packages/bundler-plugin-core/test Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -36,23 +36,24 @@ describe("createRollupDebugIdInjectionHooks", () => {
3636 } ) ;
3737
3838 it . each ( [
39- [ "bundle.js" , true ] ,
40- [ "bundle.mjs" , true ] ,
41- [ "bundle.cjs" , true ] ,
42- [ "bundle.js?foo=bar" , true ] ,
43- [ "bundle.js#hash" , true ] ,
44- [ "index.html" , false ] ,
45- [ "styles.css" , false ] ,
46- ] ) ( "should process file '%s': %s" , ( fileName , shouldProcess ) => {
39+ [ "bundle.js" ] ,
40+ [ "bundle.mjs" ] ,
41+ [ "bundle.cjs" ] ,
42+ [ "bundle.js?foo=bar" ] ,
43+ [ "bundle.js#hash" ] ,
44+ ] ) ( "should process file '%s': %s" , ( fileName ) => {
4745 const code = 'console.log("test");' ;
4846 const result = hooks . renderChunk ( code , { fileName } ) ;
4947
50- if ( shouldProcess ) {
51- expect ( result ) . not . toBeNull ( ) ;
52- expect ( result ?. code ) . toContain ( "_sentryDebugIdIdentifier" ) ;
53- } else {
54- expect ( result ) . toBeNull ( ) ;
55- }
48+ expect ( result ) . not . toBeNull ( ) ;
49+ expect ( result ?. code ) . toContain ( "_sentryDebugIdIdentifier" ) ;
50+ } ) ;
51+
52+ it . each ( [ [ "index.html" ] , [ "styles.css" ] ] ) ( "should NOT process file '%s': %s" , ( fileName ) => {
53+ const code = 'console.log("test");' ;
54+ const result = hooks . renderChunk ( code , { fileName } ) ;
55+
56+ expect ( result ) . toBeNull ( ) ;
5657 } ) ;
5758
5859 it . each ( [
You can’t perform that action at this time.
0 commit comments