Improve Jasmine test for project page

The test data should go *inside* the function, not as global variables.
Otherwise when a second test is created, its copies of testData and
any other global variables may shadow these, leading to either this
test or the other one failing because the test data isn't what was
expected by that particular test. If the test data is *inside* the
test function, though, it will be scope-limited, and two variables with
the name testData can't shadow each other.