-
Notifications
You must be signed in to change notification settings - Fork 29
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
base: master
Are you sure you want to change the base?
Conversation
} | ||
); | ||
expect(() => { | ||
this.foo.bar(); |
There was a problem hiding this comment.
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 :)
Should we try to get this completed for v11? |
@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. |
d88ce9c
to
fb685af
Compare
fb685af
to
c2a0d4e
Compare
); | ||
expect(() => { | ||
throw new Error('The error message'); | ||
}, 'to throw', 'The error message'); |
There was a problem hiding this comment.
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"
);
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'
);
Show that we can use modern syntax in the documentation