johnbintz / guard-jasmine-headless-webkit

Use Guard with jasmine-headless-webkit
http://johnbintz.github.com/jasmine-headless-webkit/
MIT License
34 stars 12 forks source link

My tests are run twice. #14

Open benogle opened 13 years ago

benogle commented 13 years ago

in the guard file:

guard 'jasmine-headless-webkit', :full_run => false, :all_on_start => false do
  watch('spec/javascripts/support/jasmine.yml')  { |m| "spec/javascripts" }
  watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) do |m|
    # Don't run tests if there was a failure compiling the JS
    if Dir["public/assets/editor-*.js"].any?
      specific_file = newest_js_file("spec/javascripts/#{m[1]}")
      all_tests = "spec/javascripts"
      specific_file or all_tests
    end
  end
  watch(%r{^spec/javascripts/.*\.(js|coffee)$})
end

Output when I save a file:

F.....F.....
FAIL: 12 tests, 2 failures, 0.178 secs.

Color picker pane fails. (/mytest.coffee:12)
  Expected '2' to equal 3. (line ~13)
    expect('2').toEqual(3);

Color picker pane fails. (/mytest.coffee:12)
  Expected '2' to equal 3. (line ~13)
    expect('2').toEqual(3);

When it runs all tests, it does not run them twice.

johnbintz commented 13 years ago

Try the latest git HEAD of jasmine-headless-webkit. That should fix the issue, someone else reported that fixes that problem.

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Ben Ogle reply@reply.github.com wrote:

in the guard file:

guard 'jasmine-headless-webkit', :full_run => false, :all_on_start => false do watch('spec/javascripts/support/jasmine.yml') { |m| "spec/javascripts" } watch(%r{^app/assets/javascripts/(.*).(js|coffee)$}) do |m|

Don't run tests if there was a failure compiling the JS

if Dir["public/assets/editor-_.js"].any? specific_file = newest_js_file("spec/javascripts/#{m[1]}") all_tests = "spec/javascripts" specific_file or alltests end end watch(%r{^spec/javascripts/..(js|coffee)$}) end

Output when I save a file:

F.....F..... FAIL: 12 tests, 2 failures, 0.178 secs.

Color picker pane fails. (/mytest.coffee:12) Expected '2' to equal 3. (line ~13) expect('2').toEqual(3);

Color picker pane fails. (/mytest.coffee:12) Expected '2' to equal 3. (line ~13) expect('2').toEqual(3);

When it runs all tests, it does not run them twice.


Reply to this email directly or view it on GitHub: https://github.com/johnbintz/guard-jasmine-headless-webkit/issues/14