From 321ddc2e414624fa21b4e7feef40de21abe3ca96 Mon Sep 17 00:00:00 2001 From: pedrobonamin Date: Tue, 22 Oct 2024 10:56:20 +0200 Subject: [PATCH] fix(core): update schedulePublishingEnabledProvider tests --- .../tool/contexts/ScheduledPublishingEnabledProvider.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sanity/src/core/scheduledPublishing/tool/contexts/ScheduledPublishingEnabledProvider.test.tsx b/packages/sanity/src/core/scheduledPublishing/tool/contexts/ScheduledPublishingEnabledProvider.test.tsx index afe88b8b2913..d0f65f3f5745 100644 --- a/packages/sanity/src/core/scheduledPublishing/tool/contexts/ScheduledPublishingEnabledProvider.test.tsx +++ b/packages/sanity/src/core/scheduledPublishing/tool/contexts/ScheduledPublishingEnabledProvider.test.tsx @@ -86,12 +86,12 @@ describe('ScheduledPublishingEnabledProvider', () => { }) it('should not show the plugin if useFeatureEnabled has an error', () => { - require('../../../hooks').useFeatureEnabled.mockReturnValue({ + useFeatureEnabledMock.mockReturnValue({ enabled: false, isLoading: true, error: new Error('Something went wrong'), }) - require('../../../studio').useWorkspace.mockReturnValue({scheduledPublishing: {enabled: true}}) + useWorkspaceMock.mockReturnValue({scheduledPublishing: {enabled: true}}) const value = renderHook(useScheduledPublishingEnabled, { wrapper: ScheduledPublishingEnabledProvider,