These are chat archives for airbnb/enzyme

Jun 2017
Kevin Fawcett
Jun 14 2017 14:11
Hello, I have a use case where a filename will end up being filenamethatisreallylong...txt and want to test that it's displayed properly. I'm having trouble thinking of a way to do this with enzyme. Is there a way to set the width of the div and assert the actual outputted value (since it is using css to do the overflow)?
Kevin Fawcett
Jun 14 2017 14:17
const wrapper = shallow(<div id='test' style='overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:20px'>Hello World asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf</div>);

// I would expect to see Hello World...
// But I actually see Hello World asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf