Widget Factory: Fix multiple var statements in test

Test failing jshint because of multiple var statements