question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to skip markup tests for edge cases that aren't supported yet

See original GitHub issue

I have a question about the Mocha tests, it’s not clear to me if it’s a condition that the commited tests in test/markup/<language>/ must all pass, or if failing edge cases can be kept there as a remainder of the fixes that must be implemented for a syntax.

For example, I noticed that the AsciiDoc syntax fails on many edge cases and advanced Asciidotor markup. So I was thinking of first creating all the tests with expected results, and then start to work on the syntax until all tests pass.

Ideally, even failing tests should be commited to master branch, because while working on the syntax the more tests are available the easier it is to see if and how new changes affect the expected results on all previous tests. In some cases, a small tweak to the syntax could fix many failed tests; in AsciiDoc this is quite likely, for example when introducing better support for verbatim and passthrough contents this might affect a whole range of elements currently being parsed incorrectly.

Since complex syntaxes like AsciiDoc might require quite a long time to get all the edge cases straight, having all the expected tests results in the Mocha test folder (regardlessly wether they pass or fail) would be a good way to keep track of the work, as well as to offer a sort of roadmap of missing features for the syntaxes.

This way, any contributor could use Mocha to see what unresolved syntax problems are pending, and anyone who notices that a syntax doesn’t behave as expected could add a test for the fail case, even if he/she isn’t planning to fix it him/herself.

I didn’t find much on this topic in the documentation, as it focuses mainly on how to carry out tests on one’s own new syntax. It doesn’t say, for example, what to do if a new syntax is in a usable stage although some edge cases tests still fail — should these tests be removed from the test folder, or be kept there for future improvements? Obviously, developing a syntax definition can often be a multi-step job, where the first usable syntax might not cover edge cases or advanced features, but be usable nevertheless.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joshgoebelcommented, Oct 7, 2019

but they should be disabled

@marcoscaceres What about something like sample.skip.txt vs sample.expect.txt for cases like this? The tests would look fro both and if it found a skip it would just ignore it…

Unless you had a better idea for how they should be disabled?

I do see the value in tests for edge cases.

0reactions
joshgoebelcommented, Oct 7, 2019

I’m all for a little flexibility here but I’m not sure what all Mocha allows regarding output during tests, reporting, etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Off-screen/hidden elements still queryable #196 - GitHub
First off, I'm new to react-testing-library . I read @kentcdodds philosophy - this quote I totally agree with: "The more your tests resemble...
Read more >
Modern React testing, part 4: Cypress and ... - Artem Sapegin
An ability to reuse mocks in integration tests and during development. Requests are still visible in the browser developer tools. Supports REST ...
Read more >
Testing With "The Force" - Coding Horror
Being able to “dream up” edge cases demonstrates that you understand both the problem and the algorithm, along with limitations. My first ...
Read more >
Known issues and workarounds (Dynamics 365 Marketing)
Customer journeys. Deactivated contacts won't receive any emails from journeys they may be participating in, but they might continue to be ...
Read more >
Improving The Accessibility Of Your Markdown
Markdown generates simple HTML markup, and simple HTML markup can be easily read by ... Skip links aren't limited to just this use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found