fix JSON syntax error
make gapi mock only usable as NodeJS moduel
more fixes for tests