-
-
Notifications
You must be signed in to change notification settings - Fork 30
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(generator): fix tdd option #40
base: main
Are you sure you want to change the base?
Conversation
generators/app/templates/test-bdd.js
Outdated
@@ -0,0 +1,11 @@ | |||
(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.
Why wrapping the tests in a IIFE? There's no reason to do so
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.
You're right. Should I also remove the use strict instruction?
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.
No, use strict is still important.
cc @eddiemonge |
I'm conflicted on this. While using the correct language is good, how many people actually use the Also, having diverging templates means having to change both instances when there is a change. In this case, I don't really see that happening a lot, if ever.' A third point is that it locks the style to TDD or BDD. While running this directly is not a problem, generators that compose on top of this may break if they previously specified QUnit or something else. |
@eddiemonge I agree, updating the templates is not a good way of doing this. We could always search and replace if tdd is specified. |
For my part, I always use the bdd way. We could remove the tdd option entirely. It's your call. |
If it can be done in one template I'd be ok with this |
I'd either drop the |
We could leverage the ejs templates in the test file.
This snippet is theoratical but this is what I have in mind. |
No description provided.