Fixed context of unit tests to work properly in browser