From 7210b3dfedd081f505ff3ae58a098bc23edda45c Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 9 Nov 2020 16:21:05 +0000 Subject: [PATCH] [misc] decaffeinate tests: decaffeinate standalone script --- .../redis-wrapper/test/scripts/standalone.js | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/libraries/redis-wrapper/test/scripts/standalone.js b/libraries/redis-wrapper/test/scripts/standalone.js index 1ee02165e7..8e85c90888 100644 --- a/libraries/redis-wrapper/test/scripts/standalone.js +++ b/libraries/redis-wrapper/test/scripts/standalone.js @@ -1,13 +1,16 @@ -# execute this script with a redis container running to test the health check -# starting and stopping redis with this script running is a good test +// execute this script with a redis container running to test the health check +// starting and stopping redis with this script running is a good test -redis = require "../.." +const redis = require('../../') -rclient = redis.createClient({host:"localhost",port:"6379"}) -setInterval () -> - rclient.healthCheck (err) -> - if err? - console.log "HEALTH CHECK FAILED", err - else - console.log "HEALTH CHECK OK" -, 1000 \ No newline at end of file +const rclient = redis.createClient({ host: 'localhost', port: '6379' }) + +setInterval(() => { + rclient.healthCheck((err) => { + if (err) { + console.log('HEALTH CHECK FAILED', err) + } else { + console.log('HEALTH CHECK OK') + } + }) +}, 1000)