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

Show that we can use modern syntax in the documentation #507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunesimonsen
Copy link
Member

Show that we can use modern syntax in the documentation

}
);
expect(() => {
this.foo.bar();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one probably needs to stay as was :)

@papandreou
Copy link
Member

Should we try to get this completed for v11?

@alexjeffburke
Copy link
Member

@papandreou think these new example are very clean, but I don't think this need be a release blocker - we can always follow up with this.

@sunesimonsen sunesimonsen force-pushed the ssimonsen/modern-syntax-in-example branch from d88ce9c to fb685af Compare January 6, 2019 09:30
@sunesimonsen sunesimonsen force-pushed the ssimonsen/modern-syntax-in-example branch from fb685af to c2a0d4e Compare January 6, 2019 09:46
@sunesimonsen sunesimonsen changed the title [WIP] Show that we can use modern syntax in the documentation Show that we can use modern syntax in the documentation Jan 6, 2019
);
expect(() => {
throw new Error('The error message');
}, 'to throw', 'The error message');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I find arrow-funcs spanning several lines can be quite difficult to read. I generally tend towards:

expect(
  () => { throw new Error("The error message"); },
  "to throw", "The error message"
);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should aim at formatting te documentation with prettier. So whatever it decides.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says:

expect(
  () => {
    throw new Error('The error message');
  },
  'to throw',
  'The error message'
);

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 this pull request may close these issues.

5 participants