jejacks0n / teaspoon

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

Add coverage.ignore option in place of suite.no_coverage #354

Closed mikepack closed 9 years ago

mikepack commented 9 years ago

Since RequireJS does not use sprockets to require assets, 4ed7fbd was added to put instrumentation on all assets if coverage is requested. suite.no_coverage (removed) was used to exclude files from instrumentation as they are compiled in suite.spec_assets and included on the page for testing. Since suite.no_coverage was only being referenced when requiring assets from sprockets, it had no affect on people using RequireJS. #322 was proposed to ignore files for the case of RequireJS. This is a more formal stab at the same idea.

Upgrade notes

Anyone doing:

suite.no_coverage += /my_file.js/

Should now do:

config.coverage do |coverage|
  coverage.ignore += /my_file.js/
end
jejacks0n commented 9 years ago

Redundant curly braces around a hash parameter.

Looks good aside from that.

We should also consider adding a notice in the deprecation saying that no_coverage no longer works, with instructions on how to get the same behavior.

mikepack commented 9 years ago

@davestevens Teaspoon 1.0 (unreleased) should fix your issue with RequireJS #322