drupal_add_js('something.js', array('scope' => 'footer')) (or the library definition equivalent) is listed in
Result: only the JS files that are in the
'header' scope are listed in
This is analogous to how the CSS page state is stored.
$items only contains the items for the current scope; and since settings on most pages are added when
$scope == 'header', that explains why only JS files that are in the
'header' scope get added to the page state.
Get proper test coverage. In my initial testing it turned out to be impossible to reproduce the same problem in the tests, likely because
User interface changes