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

How can I mock this.user.github.username() / this.user.name()? #1244

Closed
retorquere opened this issue May 28, 2020 · 1 comment
Closed

How can I mock this.user.github.username() / this.user.name()? #1244

retorquere opened this issue May 28, 2020 · 1 comment
Labels
needs triage Awaiting triage

Comments

@retorquere
Copy link

retorquere commented May 28, 2020

I'm trying to create a unit test for my generator, but I can't find how to mock out this.user.github.username() / this.user.name()

@retorquere retorquere added the needs triage Awaiting triage label May 28, 2020
@retorquere retorquere changed the title How can I mock this.user.github.username()? How can I mock this.user.github.username() / this.user.name()? May 28, 2020
@mshima
Copy link
Member

mshima commented May 29, 2020

Use should mock require('yeoman-generator/actions/user').*.

@mshima mshima closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants