detox-copilot
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -13,9 +13,9 @@ "use strict"; | ||
const copilotInstance = Copilot_1.Copilot.getInstance(); | ||
const results = new Array(); | ||
for (const intent of steps) { | ||
results.push(await copilotInstance.performStep(intent)); | ||
let result; | ||
for await (const intent of steps) { | ||
result = await copilotInstance.performStep(intent); | ||
} | ||
return results.length === 1 ? results[0] : results; | ||
return result; | ||
} | ||
}; | ||
exports.default = copilot; |
@@ -98,4 +98,3 @@ "use strict"; | ||
.mockResolvedValueOnce('// Enter password'); | ||
const results = await index_1.default.perform('Tap on the login button', 'Enter username "testuser"', 'Enter password "password123"'); | ||
expect(results).toHaveLength(3); | ||
await index_1.default.perform('Tap on the login button', 'Enter username "testuser"', 'Enter password "password123"'); | ||
expect(mockPromptHandler.runPrompt).toHaveBeenCalledTimes(3); | ||
@@ -102,0 +101,0 @@ expect(mockFrameworkDriver.captureSnapshotImage).toHaveBeenCalledTimes(3); |
@@ -19,3 +19,3 @@ /** | ||
* Performs a testing operation or series of testing operations in the app based on the given `steps`. | ||
* @returns The result of the operation(s), which can be a single value or an array of values for each step. | ||
* @returns The result of the last step, if any. | ||
* @example Tap on the login button | ||
@@ -27,3 +27,3 @@ * @example Scroll down to the 7th item in the Events list | ||
*/ | ||
perform: (...steps: string[]) => Promise<any | any[]>; | ||
perform: (...steps: string[]) => Promise<string>; | ||
} | ||
@@ -30,0 +30,0 @@ /** |
{ | ||
"name": "detox-copilot", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "A flexible plugin that drives your tests with human-written commands, enhanced by the power of large language models (LLMs)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63161
1286