max-mapper / standard-format

converts your code into Standard JavaScript Format
264 stars 59 forks source link

Some tests fail in esformatter v0.7.3 #90

Closed uiur closed 9 years ago

uiur commented 9 years ago

Some tests fail in the latest version of esformatter.

This commit might be related. https://github.com/millermedeiros/esformatter/commit/99535097c3d1752c31b14e95c998945ea98d48d2

❯ npm test
  multiline semicolons

    ✗ Add semicolon before `[` and `(` if they are the first things on the line
     ---
       operator: equal
       expected:
         'var x = 2\n;[1, 2, 3].map(function () {})\n\nvar y = 8\n;(function () {\n  bar()\n}())\n'
       actual:
         'var x = 2;[1, 2, 3].map(function () {})\n\nvar y = 8;(function () {\n  bar()\n}())\n'
       at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/multiline.js:153:14)
     ...

  singleline transforms

    ✗ Remove unneeded trailing semicolons that are followed by a comment
     ---
       operator: equal
       expected: 'var x = 123 // Useful comment\n'
       actual:   'var x = 123// Useful comment\n'
       at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/singleline.js:119:14)
     ...

  singleline transforms CRLF

    ✗ Remove unneeded trailing semicolons that are followed by a comment
     ---
       operator: equal
       expected: 'var x = 123 // Useful comment\r\n'
       actual:   'var x = 123// Useful comment\r\n'
       at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/singleline.js:129:14)
     ...

  Failed Tests: There were 3 failures

    8) multiline semicolons

      ✗ Add semicolon before `[` and `(` if they are the first things on the line

    11) singleline transforms

      ✗ Remove unneeded trailing semicolons that are followed by a comment

    12) singleline transforms CRLF

      ✗ Remove unneeded trailing semicolons that are followed by a comment

  total:     59
  passing:   56
  failing:   3
  duration:  1.5s
Flet commented 9 years ago

fixed in #91 and published as 1.6.1