From the battery packs I've opened so far, most usual the spec numbers on the assembled battery pack is about the model of the battery cells inside. Energy or capacity usually correspond to what is written on the cells inside the device, and not to how much the final battery pack ensemble can deliver.
This is usually not a problem, because most of the battery packs (for example laptop batteries), have no DC-DC converter inside. USB power banks are an exception, though they inherit the habit of telling the cells capacity.
Wh conversion is done considering the mAh capacity at an average of 3.7V/cell, for Li chemistry recheargeables, so mAh=Wh/3.7*1000, unless other than 3.7V average value is specified on the Wh label.
The exact charging/discharging procedure, level voltages, load type and test temperature varies with each cell model. For example, when testing at a lower current, the total energy delivered will be higher than when testing the same cell at a higher current load (typical load is 0.2C, but some datasheets might specify other value).
To get the capacity imprinted on the cells (not on the final device) the testing conditions and procedure must be followed exactly as specified in the (individual cell's) datasheet.