Tests rendering the JavaScript with a file's weight above jQuery's.
function testRenderDifferentWeight() {
// JavaScript files are sorted first by group, then by the 'every_page'
// flag, then by weight (see drupal_sort_css_js()), so to test the effect of
// weight, we need the other two options to be the same.
drupal_add_library('system', 'jquery');
drupal_add_js('core/misc/collapse.js', array(
'group' => JS_LIBRARY,
'every_page' => TRUE,
'weight' => -21,
));
$javascript = drupal_get_js();
$this
->assertTrue(strpos($javascript, 'core/misc/collapse.js') < strpos($javascript, 'core/misc/jquery.js'), 'Rendering a JavaScript file above jQuery.');
}