-
Notifications
You must be signed in to change notification settings - Fork 278
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
fix: inherit config #394
base: main
Are you sure you want to change the base?
fix: inherit config #394
Conversation
@@ -173,4 +173,15 @@ describe("load-assets-from-plopfile", function () { | |||
expect(plop.getPartialList().length).toBe(1); | |||
expect(plop.getPartialList()[0]).toBe("p1"); | |||
}); | |||
|
|||
test.todo("plop.load loaded plopfile inherits config", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Let's make this an E2E test given your findings on config test challenges before we merge
test.todo("plop.load loaded plopfile inherits config", async function () { | ||
const plop = await nodePlop("", { | ||
force: true, | ||
}); | ||
|
||
await plop.load(plopfilePath, null, {}); | ||
|
||
// not a working test | ||
expect(plop.config.force).toBe(true); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a TODO test, let's add an e2e
test using Plop CLI :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e2e test using Plop CLI
Is there a prior art for this?
Can't find anything like that in the repo.
Pass configuration from main plop to loaded plops.
Did not add tests, as I could not find anywhere to hook into to check the config values. Config is not exposed directly and doesn't seem to be exposed indirectly either. But I added a stub test, in case you know where to hook into and want to fix this quickly, or let me know and I can add another commit for the test.
Closes: #392