confluentinc / confluentinc/vscode

Create easy-to-use `withProgress` stub helper, or remove all `withProgress` stubbing entirely

Open
#2,722 0 comments 0 reactions 0 assignees View on GitHub
cleanup extension development testing
Dominant language
TypeScript
Stars
34
Forks
17
Avg merge
1d 22h
Merged PRs (30d)
8

Description

Most of the time, we're just trying to stub it to test whatever the inner function is that `withProgress` waits on, but handling that in Mocha tests is pretty gross and we have [a few different implementations](https://github.com/search?q=repo%3Aconfluentinc%2Fvscode%20withProgress%20path%3A*.test.ts&type=code) of it.

If we can't come up with an easy-to-use stub helper (like [the ones we have now](https://github.com/confluentinc/vscode/tree/main/tests/stubs)), we should do some refactoring so any `withProgress` calls are light wrappers around the actual-functions being tested. (One example of this is our [Kafka cluster quickpick](https://github.com/confluentinc/vscode/blob/fdd12d21a1391b821d571726ac03a6a74da62afe/src/quickpicks/kafkaClusters.ts#L21-L31).)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.