BenoitZugmeyer / eslint-plugin-html

An ESLint plugin to extract and lint scripts from HTML files.
ISC License
430 stars 51 forks source link

Unit tests will fail with the next ESLint version #32

Closed nzakas closed 8 years ago

nzakas commented 8 years ago

Just a heads up, we've changed the error message coming from the indent rule to be more specific, and that's causing some of your tests to fail:

 1) plugin html/indent setting should work with a zero absolute indentation descriptor:

      AssertionError: 'Expected indentation of 0 spaces but found 2.' == 'Expected indentation of 0 space characters but found 2.'
      + expected - actual

      -Expected indentation of 0 spaces but found 2.
      +Expected indentation of 0 space characters but found 2.

      at Context.<anonymous> (test/plugin.js:91:14)

  2) plugin html/indent setting should work with a non-zero absolute indentation descriptor:

      AssertionError: 'Expected indentation of 2 spaces but found 0.' == 'Expected indentation of 2 space characters but found 0.'
      + expected - actual

      -Expected indentation of 2 spaces but found 0.
      +Expected indentation of 2 space characters but found 0.

      at Context.<anonymous> (test/plugin.js:115:14)

  3) plugin html/indent setting should work with relative indentation descriptor:

      AssertionError: 'Expected indentation of 0 spaces but found 2.' == 'Expected indentation of 0 space characters but found 2.'
      + expected - actual

      -Expected indentation of 0 spaces but found 2.
      +Expected indentation of 0 space characters but found 2.

      at Context.<anonymous> (test/plugin.js:156:14)

In general, we recommend that you not rely on the exact error message produced by rules in your tests because they can change over time.

BenoitZugmeyer commented 8 years ago

Thank you very much for the heads up. That's fixed!