From 913914362d1bdf7018f616c6460162ca90e57e75 Mon Sep 17 00:00:00 2001 From: Andrew Campbell Date: Thu, 14 Jan 2021 11:33:17 +1100 Subject: [PATCH] add clarifying comments and remove debug code --- src/tasks/get-groups.ts | 2 ++ test/panel/group-filtering.spec.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tasks/get-groups.ts b/src/tasks/get-groups.ts index eb69c86..e6f5a93 100644 --- a/src/tasks/get-groups.ts +++ b/src/tasks/get-groups.ts @@ -31,6 +31,8 @@ export function getGroups({ result.push(server); } if (allowedGroups.includes('client')) { + // Hydration, although run client-side, relies on renderToString and + // should not be run if the plugin is configured to be client-only const tasks = allowedGroups.includes('server') ? client.tasks : client.tasks.filter((task) => task.name !== 'Hydrate'); diff --git a/test/panel/group-filtering.spec.tsx b/test/panel/group-filtering.spec.tsx index 1c3e65b..97c2ee6 100644 --- a/test/panel/group-filtering.spec.tsx +++ b/test/panel/group-filtering.spec.tsx @@ -15,7 +15,7 @@ import server from '../../src/tasks/preset/server'; it('should allow filtering of tasks (client only)', () => { // 1: Initial render const channel: Channel = new Channel({ async: false }); - const { container, queryByText, debug } = render( + const { container, queryByText } = render( ,