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

Feature Request: Multiline support #35

Open
Eoksni opened this issue Mar 3, 2018 · 2 comments · May be fixed by #37
Open

Feature Request: Multiline support #35

Eoksni opened this issue Mar 3, 2018 · 2 comments · May be fixed by #37

Comments

@Eoksni
Copy link

Eoksni commented Mar 3, 2018

I know doctests are supposed to be simple, but when one needs to match against objects, it is getting not pretty.

/**
 * @example
 * transition(newgame(), 'playerTwo')
 * // => { state: 'normal', playerOne: 'love', playerTwo: 15 }
 */

For the first part of assert I can do

/**
 * @example
 * (function() {
 *
 *  const game = newgame();
 *  return transition(game, 'playerTwo');
 *
 * })()
 * // => { state: 'normal', playerOne: 'love', playerTwo: 15 }
 */

so that is kinda multiline, although its not very pretty.

But the result object needs to be written in one line :(

@aaronjameslang
Copy link

@yamadapc Would a PR be welcome?

@yamadapc
Copy link
Owner

Sure a PR would be welcome

@Eoksni Eoksni linked a pull request Jun 26, 2019 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants