moved test initialization to JS file (for DRY and privileged apps compatibility)