From 09dadf5ce8c5f0601aff7ad8cae90a9c60ffae6c Mon Sep 17 00:00:00 2001 From: Maximilian Mairinger Date: Mon, 20 Apr 2020 11:38:59 +0200 Subject: [PATCH] [Api]: QOL imporvement. Allow string as opts. --- lib/wait-on.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/wait-on.js b/lib/wait-on.js index a5a86b1..f121166 100644 --- a/lib/wait-on.js +++ b/lib/wait-on.js @@ -80,6 +80,8 @@ const WAIT_ON_SCHEMA = Joi.object({ if not specified, wait-on will return a promise that will be rejected if resource checks did not succeed or resolved otherwise */ function waitOn(opts, cb) { + if (typeof opts === "string") opts = {resources: [opts]} + if (cb !== undefined) { return waitOnImpl(opts, cb); } else {