3

I'm writing an ember.js addon. When running ember test Ember will add generic should pass jshint tests to my test suite. That's great as far as it goes, but the javascript files from the main directory (index.js, Brocfile.js) are missing as are the files from app/**/*. As far as I can see, only files in addon/**/\ and tests/**/\ are covered.

Am I missing some obvious configuration option? Is this a bug?

jnfingerle
  • 713
  • 4
  • 16
  • Yes, I could do it myself. But this would mean just running jshint, not using the quite nice test case generation. [edit:] The comment I was responding to, seems to be deleted. It was suggesting `gulp` or `grunt`. – jnfingerle Jul 02 '15 at 14:03
  • It's not clear what you are trying to do here. You want the addon test suite to lint files in the consuming application? Why? – steveax Jul 02 '15 at 15:46
  • No. I don't talk about the consuming app. I'm talking about the addon, directories of the addon and the test suite of the addon. I want that to lint (jshint) *all* js-files that would go into the VCS (essentially all except for npm and bower dependencies). At the moment it lints some of those, but not all. My question details, which are included and which are missing. – jnfingerle Jul 02 '15 at 23:35

1 Answers1

0

No it is not a bug. That's how the ember test works.

Once there was an issue about running linter. But I didn't find any rfc about these issue.

If you want to run linting on your code base, you can use either cli or ide plugins.

ykaragol
  • 6,139
  • 3
  • 29
  • 56
  • As mentioned above, I'm well aware of ways to run JSHint myself. I'm still feeling a bit let down that `ember test` runs JSHint on most, but not on all *.js files and leaves me to "run your own" anyway. That said, I fail to see how the linked issue is relevant to which files are included in `ember test`'s JSHint runs. – jnfingerle Dec 12 '16 at 10:36
  • Oh, yes, it is not clear. Actually the issue is only about running linter with an ember command. It is not related with tests. `ember test` only runs linter with your test files and classes under tests. – ykaragol Dec 12 '16 at 11:10
  • 1
    OK, thanks. For the time being I'll stick to disabling JSHint in ember tests and running my own. – jnfingerle Dec 12 '16 at 13:53