-
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
Missing space between var1 instanceof var2 in output #1513
Labels
Comments
Yea that's not great. Thanks for reporting it. |
The same behavior affects any infix operator. Empty strings are also rendered invisible: const val = 'some value';
test('fails with multiple === expressions', t => {
t.false(val === '' && '' === val);
});
One way to resolve this would be to use babel-generator in enhance-assert.js to regenerate the code from the AST, instead of concatenating the token values. |
codeslikejaggars
pushed a commit
to codeslikejaggars/ava
that referenced
this issue
Oct 25, 2017
codeslikejaggars
pushed a commit
to codeslikejaggars/ava
that referenced
this issue
Oct 25, 2017
novemberborn
pushed a commit
that referenced
this issue
Oct 26, 2017
@codeslikejaggars @novemberborn thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When a test fails while using
test.true(var1 instanceof var2)
the output removes the spaces.Test Source
Error Message & Stack Trace
Config
Copy the relevant section from
package.json
:Command-Line Arguments
Copy your npm build scripts or the
ava
command used:Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:
The text was updated successfully, but these errors were encountered: