Option to generate scenarios with `it` alias instead of `test`
cscheffauer opened this issue · comments
Christoph Scheffauer commented
Hi,
right now when code is generated, the tests always start with Jests test
keyword. Would it be possible to add an option to use the it
alias instead? see here
I think the pieces of code which should be touched then are here:
Ben Compton commented
Actually, this is already possible by naming the test
function argument whatever you like. For example, both of these are equivalent:
defineFeature(feature, (test) => {
test('Entering a correct password', ({ given, when, then }) => {
...
...
defineFeature(feature, (scenario) => {
scenario('Entering a correct password', ({ given, when, then }) => {
...
...
The main downside is that certain tools may not work, like the Jest VSCode plug-in might not recognize a scenario
in the same it recognizes a test
.