EvHaus / doby-grid

An HTML table element on steroids.
Other
14 stars 5 forks source link

Unit tests failing #129

Closed ckosmowski closed 10 years ago

ckosmowski commented 10 years ago

The new unit tests (options.minColumnWidth) do not work for me. I'm getting a width of 248 while they should be greater than 250 instead. How can this be? Maybe a different font rendering on Windows or stuff like that?

Also the "get()" test fails (Typerror: "null" is not an object).

Something seems to be wrong since the new jasmine version arrived. Also the build process now seems to need git to be install on the console where grunt is run.

EvHaus commented 10 years ago

Are you running the tests through grunt or via the web runner?

ckosmowski commented 10 years ago

Through grunt. Am 06.09.2014 02:18 schrieb "Globex Designs, Inc" <notifications@github.com

:

Are you running the tests through grunt or via the web runner?

— Reply to this email directly or view it on GitHub https://github.com/globexdesigns/doby-grid/issues/129#issuecomment-54696204 .

EvHaus commented 10 years ago

Try deleting the node_modules directory. Then run npm cache clean and then run npm install. Then try re-running the tests.

ckosmowski commented 10 years ago

I just did that. But i'm still having the same problems. I'm testing with "7b027e86038bf7a1bc9ddb86b6f5d80921d225bc". In the tests you rely on that the element will be bigger than 250px. Could it be, that there is anything different in my environment (windows) that makes the element be less wide than that?

EvHaus commented 10 years ago

Just ran the tests on a Windows box and there are indeed many failing tests. I'll investigate further. Thanks.

EvHaus commented 10 years ago

I think the issue should be fixed now. Can you pull the latest and try again now?

Those 2 particular unit tests are not ideal as they try to test test pixel widths of fonts which are rendered different on different platforms. I've updated the test to use a range value instead. I may need to re-think that unit test in the future entirely as it's not very reliable.