From 62d36107d9106e5e2e74b450ea75eb9fe998bf49 Mon Sep 17 00:00:00 2001 From: Ricardo Pereira Date: Mon, 26 Sep 2016 08:59:59 +0100 Subject: [PATCH] Fix InvalidNimbleAPIUsage: nested async expectations are not allowed to avoid creating flaky tests --- Spec/RestClientChannel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spec/RestClientChannel.swift b/Spec/RestClientChannel.swift index 7d00968f8..c1d611bcf 100644 --- a/Spec/RestClientChannel.swift +++ b/Spec/RestClientChannel.swift @@ -344,8 +344,8 @@ class RestClientChannel: QuickSpec { } } - delay(0.2) { - waitUntil(timeout: testTimeout) { done in + waitUntil(timeout: testTimeout) { done in + delay(0.2) { channel.publish(nil, data: "message3") { _ in done() }