-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract molecule to subgenerator (#36)
* Add molecule subgenerator skel * Move molecule generation to its own subgenerator * Remove extra prompts overrides * Mock molecule subgenerator * Spy on mocked generator * Add molecule subgenerator options * Extract prompts to module * Fix options * 0.3.0
- Loading branch information
Showing
18 changed files
with
826 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var Generator = require('yeoman-generator'); | ||
|
||
const spy = jest.fn(); | ||
const mockGenerator = () => | ||
class extends Generator { | ||
constructor(args, opts) { | ||
super(args, opts); | ||
spy(args, opts); | ||
} | ||
|
||
test() { | ||
// This method is required so that it doesn't complain about the | ||
// generator having no method to run. It doesn't do anything useful other | ||
// than that. | ||
} | ||
}; | ||
|
||
module.exports = { | ||
mockGenerator, | ||
spy, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.