jejacks0n / teaspoon

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

Skipped Tests not Logged in Console #398

Closed gmacdougall closed 9 years ago

gmacdougall commented 9 years ago

Using the following test with teaspoon-jasmine:

describe "skipped test", ->
  it 'should have 2 examples', ->
    expect(1+1).toBe(2)

  describe 'this breaks things', ->
    beforeEach undefined

    it 'does not log this example', ->
      expect(true).toBe(false)

Running the test gives the following:

% bundle exec teaspoon -f documentation
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:45074/teaspoon/default
skipped test
  should have 2 examples

Finished in 0.00500 seconds
1 example, 0 failures

The second example is skipped due to beforeEach undefined but the test is not run, and is not reported.

This can obviously be fixed by having a proper beforeEach but if you accidentally break your tests, having the skipped without any notification is not ideal.

jejacks0n commented 9 years ago

I'm not convinced this is a teaspoon thing, and think it's a jasmine thing. Test it out with raw jasmine to be sure. But based on how teaspoon is written, it outputs what is reported to the reporter in general terms, so if it's not being reported, it's probably because the reporter (aka this is primarily teaspoons job) is not being told.

I agree it's not ideal. Would be curious how mocha handles this.

gmacdougall commented 9 years ago

You are correct. Jasmine itself only reports one spec being run.

Thanks for your assistance.