mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

Tests do not fail even when errors are thrown? #135

Closed alessioalex closed 4 years ago

alessioalex commented 10 years ago

Open date.spec.js and throw an error inside a test, any test. Then run the test command and see everything succeed.

mde commented 10 years ago

@longlho, any idea about this?

longlho commented 10 years ago

Takin a look tonite

LH

On Apr 1, 2014, at 8:14 PM, Matthew Eernisse notifications@github.com wrote:

@longlho, any idea about this?

— Reply to this email directly or view it on GitHub.

longlho commented 10 years ago

I can't seem to reproduce it, added a throw new Error('test') to any of the test & jasmine-node correctly fails it

alessioalex commented 10 years ago

After I've pulled the latest version it seems everything is running as expected. However sometimes when I run the tests I get this:

$ ./node_modules/jasmine-node/bin/jasmine-node spec/
................F...........................................................................

Failures:

  1) timezoneJS.Date should output toGMTString correctly
   Message:
     Expected 1396436571297 to equal 1396436571296.
   Stacktrace:
     Error: Expected 1396436571297 to equal 1396436571296.
    at null.<anonymous> (c:\Users\avladutu\Desktop\node_tests\timezoneJS\spec\date.spec.js:114:26)

Finished in 0.199 seconds
92 tests, 308 assertions, 1 failure, 0 skipped
longlho commented 10 years ago

Hmm off by 1ms... that's rare