enhanced-assertion-formatting.js 474 B

12345678910111213141516171819202122
  1. import test from '../..';
  2. const foo = 'foo';
  3. test('fails with multiple empty string expressions and mixed quotes', t => {
  4. // eslint-disable-next-line quotes, yoda
  5. t.true(foo === '' && "" === foo);
  6. });
  7. test('fails with "instanceof" expression', t => {
  8. // eslint-disable-next-line no-new-object
  9. t.false(new Object(foo) instanceof Object);
  10. });
  11. test('fails with multiple lines', t => {
  12. t.true(
  13. [foo].filter(item => {
  14. return item === 'bar';
  15. }).length > 0
  16. );
  17. });