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

Comments are not take into account when scanning for '.only' #11

Open
andreaspalsson opened this issue Oct 15, 2020 · 1 comment
Open

Comments

@andreaspalsson
Copy link
Contributor

When scanning files for .only Kuta will not disregard comments. So if you have test file like this

// Feature.only('feature 1', () => {
//   Scenario('scenario 1', () => {});
// });

Feature('feature 2', () => {
  Scenario('scenario 2', () => {});
});

no test will run because Kuta will match the .only in the comment and then disregard the other test. You will only get this output

Running 1 test file(s) in 1 processes...

I have only tested it with line comments but I'm guessing it will be the same with block comments.

Expected behaviour

That Kuta disregard .only in comments and for the given example that the test feature 2 runs.

@andreaspalsson andreaspalsson changed the title Comments are not take into account when scanning for only Comments are not take into account when scanning for '.only' Oct 15, 2020
@AntonNiklasson
Copy link

Perhaps this could be solved with an AST?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants