-
Notifications
You must be signed in to change notification settings - Fork 1
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
unexpected-markdown does not allow a working example to be placed in documentation #3
Comments
On node.js 0.10.43 I get this output: https://gist.github.com/papandreou/e8fbd50782e8c5d0b22f5fcf1ba1cc37 Are you talking about the "unexpected-mitm: Could not find the right place to inject the recorded exchanges" message? |
Still happening with unexpected-markdown 1.6.1. |
Ah, now I see it. The example in the documentation that exercises the injection mode should be marked as |
It seems like there's a bug in either the source mapping or the injection logic, but if I change https://github.com/unexpectedjs/unexpected-mitm/blob/master/lib/unexpectedMitm.js#L375 to |
Looks like it's the |
Oh given you're diagnosis I think I know exactly what this is - the injection mode code getSourceText()s before it starts finding injection points etc. What is almost certainly happening is it's getting the original as opposed to the transpiled file. Interesting case - we end up invalidating assumptions of others... wonder if there is any good way of passing the transpiled version across? |
The unexpected-mitm plugin makes use unexpected-markdown to do rendering of its documentation. Unfortunately, while the examples currently rendered are correct and work standalone something likely related to -markdown seems to interfere with the correct functioning of that plugin.
This can be seen by observed 'npm test' in unexpected-mitm - a message will be output by unexpected-mitm it has not. Note, there may not necessarily be anything to fix here (mostly due to the complex working of the -mitm plugin), but I think this might be an interesting one to investigate at some point.
The text was updated successfully, but these errors were encountered: