Adjusted promise require in tests