From 3b937337d2a4db7736984930b7587c2a016535bb Mon Sep 17 00:00:00 2001 From: eran-cohen Date: Mon, 5 Sep 2022 11:45:06 +0300 Subject: [PATCH] Update api.md give a working example for using exitCode with waitFor, the current example doesn't work and creates a build error --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index aa843e9..f229f92 100644 --- a/docs/api.md +++ b/docs/api.md @@ -185,7 +185,7 @@ exit code it closed with. ```javascript const instance = render('command') -await waitFor(() => instance.hasExit()).toMatchObject({exitCode: 1}) +await waitFor(() => expect(instance.hasExit()).toMatchObject({ exitCode: 1 })) ``` This method returns `null` if still running, but `{exitCode: number}` if it has