Fix Jest Mock Cannot Access Before Initialization Error

Fix Jest Mock Cannot Access Before Initialization Error