@@ -3267,7 +3267,7 @@ def test_bundle_analysis_asset_routes(self, get_storage_service):
32673267 )
32683268
32693269 with open (
3270- "./services/tests/samples/bundle_with_assets_and_modules .sqlite" , "rb"
3270+ "./services/tests/samples/bundle_with_asset_routes .sqlite" , "rb"
32713271 ) as f :
32723272 storage_path = StoragePaths .bundle_report .path (
32733273 repo_key = ArchiveService .get_archive_hash (self .repo ),
@@ -3285,8 +3285,8 @@ def test_bundle_analysis_asset_routes(self, get_storage_service):
32853285 bundleAnalysisReport {
32863286 __typename
32873287 ... on BundleAnalysisReport {
3288- bundle(name: "b5 ") {
3289- asset(name: " assets/LazyComponent-fcbb0922.js") {
3288+ bundle(name: "@codecov/example-sveltekit-app-client-esm ") {
3289+ assets {
32903290 name
32913291 normalizedName
32923292 routes
@@ -3310,18 +3310,151 @@ def test_bundle_analysis_asset_routes(self, get_storage_service):
33103310 data = self .gql_request (query , variables = variables )
33113311 commit = data ["owner" ]["repository" ]["commit" ]
33123312
3313- asset_report = commit ["bundleAnalysis" ]["bundleAnalysisReport" ]["bundle" ][
3314- "asset "
3313+ asset_reports = commit ["bundleAnalysis" ]["bundleAnalysisReport" ]["bundle" ][
3314+ "assets "
33153315 ]
33163316
3317- assert asset_report is not None
3318- assert asset_report ["name" ] == "assets/LazyComponent-fcbb0922.js"
3319- assert asset_report ["normalizedName" ] == "assets/LazyComponent-*.js"
3320- assert asset_report ["routes" ] == [
3321- "/" ,
3322- "/about" ,
3323- "/login" ,
3324- "/super/long/url/path" ,
3317+ assert asset_reports == [
3318+ {
3319+ "name" : "_app/immutable/assets/svelte-welcome.VNiyy3gC.png" ,
3320+ "normalizedName" : "_app/immutable/assets/svelte-welcome.*.png" ,
3321+ "routes" : [],
3322+ },
3323+ {
3324+ "name" : "_app/immutable/assets/svelte-welcome.0pIiHnVF.webp" ,
3325+ "normalizedName" : "_app/immutable/assets/svelte-welcome.*.webp" ,
3326+ "routes" : [],
3327+ },
3328+ {
3329+ "name" : "_app/immutable/assets/fira-mono-all-400-normal.B2mvLtSD.woff" ,
3330+ "normalizedName" : "_app/immutable/assets/fira-mono-all-400-normal.*.woff" ,
3331+ "routes" : [],
3332+ },
3333+ {
3334+ "name" : "_app/immutable/chunks/entry.BaWB2kHj.js" ,
3335+ "normalizedName" : "_app/immutable/chunks/entry.*.js" ,
3336+ "routes" : [],
3337+ },
3338+ {
3339+ "name" : "_app/immutable/nodes/4.CcjRtXvw.js" ,
3340+ "normalizedName" : "_app/immutable/nodes/4.*.js" ,
3341+ "routes" : ["/sverdle" ],
3342+ },
3343+ {
3344+ "name" : "_app/immutable/assets/fira-mono-latin-400-normal.DKjLVgQi.woff2" ,
3345+ "normalizedName" : "_app/immutable/assets/fira-mono-latin-400-normal.*.woff2" ,
3346+ "routes" : [],
3347+ },
3348+ {
3349+ "name" : "_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.B04YIrm4.woff2" ,
3350+ "normalizedName" : "_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.*.woff2" ,
3351+ "routes" : [],
3352+ },
3353+ {
3354+ "name" : "_app/immutable/assets/fira-mono-latin-ext-400-normal.D6XfiR-_.woff2" ,
3355+ "normalizedName" : "_app/immutable/assets/fira-mono-latin-ext-400-normal.D6XfiR-_.woff2" ,
3356+ "routes" : [],
3357+ },
3358+ {
3359+ "name" : "_app/immutable/assets/fira-mono-greek-400-normal.C3zng6O6.woff2" ,
3360+ "normalizedName" : "_app/immutable/assets/fira-mono-greek-400-normal.*.woff2" ,
3361+ "routes" : [],
3362+ },
3363+ {
3364+ "name" : "_app/immutable/assets/fira-mono-cyrillic-400-normal.36-45Uyg.woff2" ,
3365+ "normalizedName" : "_app/immutable/assets/fira-mono-cyrillic-400-normal.*.woff2" ,
3366+ "routes" : [],
3367+ },
3368+ {
3369+ "name" : "_app/immutable/nodes/0.CL_S-12h.js" ,
3370+ "normalizedName" : "_app/immutable/nodes/0.CL_S-12h.js" ,
3371+ "routes" : ["/" ],
3372+ },
3373+ {
3374+ "name" : "_app/immutable/assets/fira-mono-greek-ext-400-normal.CsqI23CO.woff2" ,
3375+ "normalizedName" : "_app/immutable/assets/fira-mono-greek-ext-400-normal.*.woff2" ,
3376+ "routes" : [],
3377+ },
3378+ {
3379+ "name" : "_app/immutable/chunks/index.DDRweiI9.js" ,
3380+ "normalizedName" : "_app/immutable/chunks/index.*.js" ,
3381+ "routes" : [],
3382+ },
3383+ {
3384+ "name" : "_app/immutable/entry/app.Dd9ByE1Q.js" ,
3385+ "normalizedName" : "_app/immutable/entry/app.*.js" ,
3386+ "routes" : [],
3387+ },
3388+ {
3389+ "name" : "_app/immutable/nodes/2.BMQFqo-e.js" ,
3390+ "normalizedName" : "_app/immutable/nodes/2.*.js" ,
3391+ "routes" : ["/" ],
3392+ },
3393+ {
3394+ "name" : "_app/immutable/assets/0.CT0x_Q5c.css" ,
3395+ "normalizedName" : "_app/immutable/assets/0.CT0x_Q5c.css" ,
3396+ "routes" : [],
3397+ },
3398+ {
3399+ "name" : "_app/immutable/assets/4.DOkkq0IA.css" ,
3400+ "normalizedName" : "_app/immutable/assets/4.*.css" ,
3401+ "routes" : [],
3402+ },
3403+ {
3404+ "name" : "_app/immutable/nodes/5.CwxmUzn6.js" ,
3405+ "normalizedName" : "_app/immutable/nodes/5.*.js" ,
3406+ "routes" : ["/sverdle/how-to-play" ],
3407+ },
3408+ {
3409+ "name" : "_app/immutable/chunks/scheduler.Dk-snqIU.js" ,
3410+ "normalizedName" : "_app/immutable/chunks/scheduler.*.js" ,
3411+ "routes" : [],
3412+ },
3413+ {
3414+ "name" : "_app/immutable/nodes/3.BqQOub2U.js" ,
3415+ "normalizedName" : "_app/immutable/nodes/3.*.js" ,
3416+ "routes" : ["/about" ],
3417+ },
3418+ {
3419+ "name" : "_app/immutable/assets/2.Cs8KR-Bb.css" ,
3420+ "normalizedName" : "_app/immutable/assets/2.*.css" ,
3421+ "routes" : [],
3422+ },
3423+ {
3424+ "name" : "_app/immutable/nodes/1.stWWSe4n.js" ,
3425+ "normalizedName" : "_app/immutable/nodes/1.*.js" ,
3426+ "routes" : [],
3427+ },
3428+ {
3429+ "name" : "_app/immutable/assets/5.CU6psp88.css" ,
3430+ "normalizedName" : "_app/immutable/assets/5.*.css" ,
3431+ "routes" : [],
3432+ },
3433+ {
3434+ "name" : "_app/immutable/chunks/index.Ice1EKvx.js" ,
3435+ "normalizedName" : "_app/immutable/chunks/index.*.js" ,
3436+ "routes" : [],
3437+ },
3438+ {
3439+ "name" : "_app/immutable/chunks/stores.BrqGIpx3.js" ,
3440+ "normalizedName" : "_app/immutable/chunks/stores.*.js" ,
3441+ "routes" : [],
3442+ },
3443+ {
3444+ "name" : "_app/immutable/entry/start.B1Q1eB84.js" ,
3445+ "normalizedName" : "_app/immutable/entry/start.*.js" ,
3446+ "routes" : [],
3447+ },
3448+ {
3449+ "name" : "_app/immutable/chunks/index.R8ovVqwX.js" ,
3450+ "normalizedName" : "_app/immutable/chunks/index.*.js" ,
3451+ "routes" : [],
3452+ },
3453+ {
3454+ "name" : "_app/version.json" ,
3455+ "normalizedName" : "_app/version.json" ,
3456+ "routes" : [],
3457+ },
33253458 ]
33263459
33273460 @patch ("graphql_api.dataloader.bundle_analysis.get_appropriate_storage_service" )
@@ -3355,12 +3488,12 @@ def test_bundle_analysis_report_info(self, get_storage_service):
33553488 bundle(name: "b5") {
33563489 info {
33573490 version
3358- plugin_name
3359- plugin_version
3360- built_at
3491+ pluginName
3492+ pluginVersion
3493+ builtAt
33613494 duration
3362- bundler_name
3363- bundler_version
3495+ bundlerName
3496+ bundlerVersion
33643497 }
33653498 }
33663499 }
@@ -3384,9 +3517,9 @@ def test_bundle_analysis_report_info(self, get_storage_service):
33843517 bundle_info = commit ["bundleAnalysis" ]["bundleAnalysisReport" ]["bundle" ]["info" ]
33853518
33863519 assert bundle_info ["version" ] == "1"
3387- assert bundle_info ["plugin_name " ] == "codecov-vite-bundle-analysis-plugin"
3388- assert bundle_info ["plugin_version " ] == "1.0.0"
3389- assert bundle_info ["built_at " ] == "2023-12-01 17:17:28.604000"
3520+ assert bundle_info ["pluginName " ] == "codecov-vite-bundle-analysis-plugin"
3521+ assert bundle_info ["pluginVersion " ] == "1.0.0"
3522+ assert bundle_info ["builtAt " ] == "2023-12-01 17:17:28.604000"
33903523 assert bundle_info ["duration" ] == 331
3391- assert bundle_info ["bundler_name " ] == "rollup"
3392- assert bundle_info ["bundler_version " ] == "3.29.4"
3524+ assert bundle_info ["bundlerName " ] == "rollup"
3525+ assert bundle_info ["bundlerVersion " ] == "3.29.4"
0 commit comments