olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.96k stars 548 forks source link

Failing test on master: "lunr.tokenizer: calling to string on passed val" #108

Closed cvan closed 10 years ago

cvan commented 10 years ago

I get this error locally:

% make test
Starting test server at http://localhost:32423
Test failed: lunr.tokenizer: calling to string on passed val
    Failed assertion: expected: tue,jan,01,2013, but was: mon,dec,31,2012
    at http://localhost:32423/test/env/qunit.js:472
    at http://localhost:32423/test/tokenizer_test.js:50
    at http://localhost:32423/test/env/qunit.js:136
    at http://localhost:32423/test/env/qunit.js:279
    at process (http://localhost:32423/test/env/qunit.js:1277)
    at http://localhost:32423/test/env/qunit.js:383
Took 57ms to run 301 tests. 300 passed, 1 failed.
make: *** [test] Error 1

It's interesting that Travis is passing.

olivernn commented 10 years ago

I'm guessing that you are in a timezone that is quite far from UTC?

I've seen this before, and even thought I had fixed it :sob:

This is supposed to be testing that the tokeniser correctly handles dates, by calling toString on them. I'm open to ideas to test the behaviour of this in a way that will work regardless of the timezone the tests are run in (in both the browser and node).

The reason it passes in Travis is because, I hope, the build servers are set to UTC.

olivernn commented 10 years ago

Related issue, I'm going to close this one and follow along in here - #75