Now stories, where we use async validation, have no mocks system for fetch methods. As a result, we always have a weird error message in the storybook stories.
Tech details:
Put fetch methods to our InsightAPI context to be able to mock them in storybooks stories and tests.
Now stories, where we use async validation, have no mocks system for fetch methods. As a result, we always have a weird error message in the storybook stories.
Tech details: Put fetch methods to our
InsightAPI
context to be able to mock them in storybooks stories and tests.Some helpers could be reused from this part of code insight code-base (related comment https://github.com/sourcegraph/sourcegraph/pull/23777#discussion_r688380271)