Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sm/test double #903

Closed
wants to merge 2 commits into from
Closed

Sm/test double #903

wants to merge 2 commits into from

Conversation

mshanemc
Copy link
Contributor

@mshanemc mshanemc commented Jan 2, 2024

Not for merging.

An experiment with "what if UT need to stub ESM modules?" In this case, it was the new inquirer. (each prompt type is exported as a function. Sinon doesn't handle stubbing those).

there's a lib called testdouble (which looks like it could be a sinon replacement if we were really ambitious).

Alternatives:
re-doing the prompt stuff on sfCommand and using those for a "stubbable seam". That solved inquirer stuff but this sinon-ESM gap is only going to get more severe (using got, moving some libraries to ESM and wanting to stub something there, etc).

@mshanemc mshanemc changed the base branch from main to sm/new-inquirer January 2, 2024 15:40
Base automatically changed from sm/new-inquirer to main January 10, 2024 19:50
@mshanemc mshanemc closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant