Open Mist3rBru opened 10 months ago
Latest commit: c40a55874097117d2e5b7afc2130f435150dcb01
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Mock API
This PR introduces a set of changes aimed to enable code testing.
Changes Made
isTestMode
: serves as an internal flag to distinguish between test and production modes.exposeTestUtils
: serves as an internal function used to expose states and methods from the core Prompt component, along with additional utility functions. This exposure allows for fine-grained control over the behavior of the Prompt during testing.mockPrompt
: is a testing utility that sets the Prompt component to run in test mode. It returns all utilities configured through theexposeTestUtils
function. This is a pivotal tool for simulating user interactions and thoroughly testing our code.Observations
multiline
andgroupMultiselect
that doesn't receivevalidate
function by param, probably it should be changed by other PR.Test Coverage Result
Relates to #35