[FIX] Git branch: Fix unit tests

beforeEach initialization does not call index.html where var debug is
set. Check if debug is defined before expecting it to be boolean.