Repair js unit tests

All JS unit tests are now green.  Includes https://github.com/alphagov/static/pull/409.