From bb1eeafbddf232e9119849dd58fc6f26485c5b63 Mon Sep 17 00:00:00 2001 From: tulios Date: Mon, 29 Oct 2018 11:02:55 +0100 Subject: [PATCH] Add "only" to testIfKafka011 --- testHelpers/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testHelpers/index.js b/testHelpers/index.js index 804f20304..b903d9062 100644 --- a/testHelpers/index.js +++ b/testHelpers/index.js @@ -165,12 +165,16 @@ const addPartitions = async ({ topic, partitions }) => { }) } -const testIfKafka011 = (description, callback) => { +const testIfKafka011 = (description, callback, testFn = test) => { return process.env.KAFKA_VERSION === '0.11' - ? test(description, callback) + ? testFn(description, callback) : test.skip(description, callback) } +testIfKafka011.only = (description, callback) => { + return testIfKafka011(description, callback, test.only) +} + const unsupportedVersionResponse = () => Buffer.from({ type: 'Buffer', data: [0, 35, 0, 0, 0, 0] }) module.exports = {