tests: use this for local state

Instead of declaring a variable in the top describe-block, we simply
assign to "this". This is supported by Karma, which will give us a
clean object for every test.

This makes it more clear where we get each piece of data from and
avoids accidentally leaking state between if-blocks.
Merge pull request #46 from mgeisler/test-use-this

tests: use this for local state