{"version":3,"file":"pages/BundleSize/components/asset-path.test.mjs","sources":["../../../../src/pages/BundleSize/components/asset-path.test.ts"],"sourcesContent":["import { describe, expect, it } from '@rstest/core';\nimport {\n  createAssetPathMap,\n  normalizeAssetPath,\n  resolveAssetFileTitleTarget,\n} from './asset-path';\n\ndescribe('BundleSize asset path helpers', () => {\n  it('normalizes Windows path separators', () => {\n    expect(normalizeAssetPath('static\\\\js\\\\main.js')).toBe('static/js/main.js');\n  });\n\n  it('resolves assets using normalized tree file paths', () => {\n    const asset = {\n      path: 'static\\\\js\\\\main.js',\n      size: 1024,\n    };\n    const assetsMap = createAssetPathMap([asset]);\n\n    expect(\n      resolveAssetFileTitleTarget(assetsMap, 'static/js/main.js', 'main.js'),\n    ).toBe(asset);\n  });\n\n  it('falls back to basename when the asset lookup misses', () => {\n    const assetsMap = createAssetPathMap([{ path: 'static/js/main.js' }]);\n\n    expect(\n      resolveAssetFileTitleTarget(assetsMap, 'static/css/main.css', 'main.css'),\n    ).toBe('main.css');\n  });\n});\n"],"names":["describe","it","expect","normalizeAssetPath","asset","assetsMap","createAssetPathMap","resolveAssetFileTitleTarget"],"mappings":";;AAOAA,SAAS,iCAAiC;IACxCC,GAAG,sCAAsC;QACvCC,OAAOC,mBAAmB,wBAAwB,IAAI,CAAC;IACzD;IAEAF,GAAG,oDAAoD;QACrD,MAAMG,QAAQ;YACZ,MAAM;YACN,MAAM;QACR;QACA,MAAMC,YAAYC,mBAAmB;YAACF;SAAM;QAE5CF,OACEK,4BAA4BF,WAAW,qBAAqB,YAC5D,IAAI,CAACD;IACT;IAEAH,GAAG,uDAAuD;QACxD,MAAMI,YAAYC,mBAAmB;YAAC;gBAAE,MAAM;YAAoB;SAAE;QAEpEJ,OACEK,4BAA4BF,WAAW,uBAAuB,aAC9D,IAAI,CAAC;IACT;AACF"}