From 0286b641af6210a5e533e344f1b45c3cdee91ef6 Mon Sep 17 00:00:00 2001 From: Asaf Korem Date: Wed, 18 Dec 2024 10:02:16 +0200 Subject: [PATCH] docs: update README with new APIs. --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a7ef8b5..c41ccbe 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,25 @@ High-level overview of the API that Detox Copilot exposes: init: (config: Config) => void; /** - * Resets the Copilot instance. - * Must be called before each test to ensure a clean state (the Copilot uses the operations history as part of + * Checks if the Copilot has been initialized. + * @returns True if the Copilot has been initialized, false otherwise. + */ +isInitialized: () => boolean; + +/** + * Start the Copilot instance. + * @note Must be called before each flow to ensure a clean state (the Copilot uses the operations history as part of * its context). */ -reset: () => void; +start: () => void; + +/** + * Finalizes the flow and optionally saves temporary cache data to the main cache. + * If `isCacheDisabled` is true, the temporary cache will not be saved. False is the default value. + * @param isCacheDisabled + * @note This must be called after the flow is complete. + */ +end: (isCacheDisabled?: boolean) => void; /** * Performs a testing operation or series of testing operations in the app based on the given `steps`.