diff --git a/internal_packages/category-picker/spec/category-picker-spec.cjsx b/internal_packages/category-picker/spec/category-picker-spec.cjsx index 58c239e10..37591beb0 100644 --- a/internal_packages/category-picker/spec/category-picker-spec.cjsx +++ b/internal_packages/category-picker/spec/category-picker-spec.cjsx @@ -39,9 +39,10 @@ describe 'CategoryPickerPopover', -> @archiveCategory = new Category(id: 'id-456', name: 'archive', displayName: "ArCHIVe", accountId: TEST_ACCOUNT_ID) @userCategory = new Category(id: 'id-789', name: null, displayName: "MyCategory", accountId: TEST_ACCOUNT_ID) - spyOn(Categories, "forAccount").andReturn NylasTestUtils.mockObservable( - [@inboxCategory, @archiveCategory, @userCategory] - ) + observable = NylasTestUtils.mockObservable([@inboxCategory, @archiveCategory, @userCategory]) + observable.sort = () => observable + + spyOn(Categories, "forAccount").andReturn observable spyOn(CategoryStore, "getStandardCategory").andReturn @inboxCategory spyOn(AccountStore, "accountForItems").andReturn @account spyOn(Actions, "closePopover")