jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Configurable JavaScript extensions #418

Closed mikepack closed 9 years ago

mikepack commented 9 years ago

In lieu of #391.

@jejacks0n :eyes: please :heart:

jejacks0n commented 9 years ago

Looks good to me. Side note about documenting in the wiki so it's captured there.

hlascelles commented 8 years ago

A note to anyone coming to this PR wondering why their .js.es6 specs are not running... You have to set your matcher to include them.

suite.matcher = '{spec/javascripts,app/assets}/**/*_spec.{js,js.es6,js.coffee,coffee}'

@jejacks0n, I'd say this may be a bug, or at least unexpected. If you look in configuration.rb:69 you see

@matcher       = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"

But that disagrees with configuration.rb:79

@js_extensions = [/(\.js)?\.coffee/, /(\.js)?\.es6/, ".es6.js"]

One supports es6, and one doesn't. Shouldn't they both match the same suffixes?

jejacks0n commented 8 years ago

happy to get a PR.

hlascelles commented 8 years ago

Great, just checking I hadn't missed anything. Created: https://github.com/modeset/teaspoon/pull/488