File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
packages/bundler-plugin-core/test Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 11import { Compiler } from "webpack" ;
2- import {
3- getDebugIdSnippet ,
4- sentryUnpluginFactory ,
5- createRollupInjectionHooks ,
6- } from "../src" ;
2+ import { getDebugIdSnippet , sentryUnpluginFactory , createRollupInjectionHooks } from "../src" ;
73import { containsOnlyImports } from "../src/utils" ;
84
95describe ( "getDebugIdSnippet" , ( ) => {
@@ -206,13 +202,13 @@ describe("createRollupInjectionHooks", () => {
206202 [
207203 "inline format with large file" ,
208204 '"use strict";\n' +
209- "// comment\n" . repeat ( 10 ) +
210- ';{try{(function(){var e="undefined"!=typeof window?window:e._sentryDebugIdIdentifier="sentry-dbid-existing-id");})();}catch(e){}};' +
211- '\nconsole.log("line");\n' . repeat ( 100 ) ,
205+ "// comment\n" . repeat ( 10 ) +
206+ ';{try{(function(){var e="undefined"!=typeof window?window:e._sentryDebugIdIdentifier="sentry-dbid-existing-id");})();}catch(e){}};' +
207+ '\nconsole.log("line");\n' . repeat ( 100 ) ,
212208 ] ,
213209 ] ) ( "should NOT inject when debug ID already exists (%s)" , ( _description , code ) => {
214210 const result = hooks . renderChunk ( code , { fileName : "bundle.js" } ) ;
215- expect ( result ) . toBeNull ( ) ;
211+ expect ( result ?. code ) . not . toContain ( "_sentryDebugIds" ) ;
216212 } ) ;
217213
218214 it ( "should only check boundaries for performance (not entire file)" , ( ) => {
You can’t perform that action at this time.
0 commit comments