From 221c920e8b8a3296d55730bcb1635624550a71a6 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Thu, 10 Sep 2020 12:26:13 +0200 Subject: [PATCH] [ML] Add comment to clarify destructuring. --- .../api_integration/apis/transform/transforms_preview.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/transform/transforms_preview.ts b/x-pack/test/api_integration/apis/transform/transforms_preview.ts index 82a6312377cd2..d0fc44cf28fdb 100644 --- a/x-pack/test/api_integration/apis/transform/transforms_preview.ts +++ b/x-pack/test/api_integration/apis/transform/transforms_preview.ts @@ -26,7 +26,10 @@ export default ({ getService }: FtrProviderContext) => { }; function getTransformPreviewConfig() { - const { dest, ...config } = generateTransformConfig('the-dummy-id'); + // passing in an empty string for transform id since we will not use + // it as part of the config request schema. Destructuring will + // remove the `dest` part of the config. + const { dest, ...config } = generateTransformConfig(''); return config as PostTransformsPreviewRequestSchema; }