Make spec-runner.js also testable, don't use the global `window` straight.
Make spec-runner.js also testable, don't use the global `window` straight.

tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend