-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use babel-generator to regenerate enhanced assertion statements
Fixes #1513.
- Loading branch information
1 parent
3b81e2c
commit 37e8b49
Showing
5 changed files
with
95 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import test from '../..'; | ||
|
||
const foo = 'foo'; | ||
|
||
test('fails with multiple empty string expressions and mixed quotes', t => { | ||
// eslint-disable-next-line quotes, yoda | ||
t.true(foo === '' && "" === foo); | ||
}); | ||
|
||
test('fails with "instanceof" expression', t => { | ||
// eslint-disable-next-line no-new-object | ||
t.false(new Object(foo) instanceof Object); | ||
}); | ||
|
||
test('fails with multiple lines', t => { | ||
t.true( | ||
[foo].filter(item => { | ||
return item === 'bar'; | ||
}).length > 0 | ||
); | ||
}); |