Add a special reference test for JavaScript, which gets all the syntax love.

Also fix a bug where results were reordered when the "current" tab
changed.