-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added recipe for writing test with code depending on a window object #585
Conversation
@@ -0,0 +1,73 @@ | |||
# Setting up AVA for browser testing. |
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.
Extra "." here
We had some users ask for this one previously. I like it, thank you for your work @bachstatter! If you could address fixes/suggestions, it'd be good to merge ;) |
|
||
t.true(onUserBlur.calledOnce) | ||
}) | ||
``` |
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.
semicolons please
Thanks for all the feedback. English is my second language. Will update as soon as possible |
# Setting up AVA for browser testing | ||
|
||
AVA does not support running tests in browsers yet. | ||
Some libraries require ```window``` object is defined. |
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 line could be better:
Some libraries require browser specific globals (
window
,document
,navigator
, etc).
Also, You just need a single tick around window
(not triple).
LGTM. Just some minor nits. |
@@ -0,0 +1,69 @@ | |||
# Setting up AVA for browser testing | |||
|
|||
AVA does not support running tests in browsers yet. |
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.
Link the word yet
to the issue tracking browser support?
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.
👍
Thank you @bachstatter. Good stuff :) |
I was debating if it should be called react-testing or browser-testing and decided to call it browser-testing since if solves a problem for all libraries that expect a global window object.
I'm happy to add changes based on feedback