Ensure :js is defined regardless of the outcome of the test.
Merge pull request #15132 from zuhao/refactor_actionpack_abstract_collector_test

Ensure :js is defined regardless of the outcome of the test.