Testem tap reporter is broken / parsing error

21 views
Skip to first unread message

Roger Studner

unread,
Mar 27, 2014, 1:45:48 PM3/27/14
to testem...@googlegroups.com
It appears if I have a test like:

test('component output is rendered', function(){
  expect(2);

  visit('/component-test').then(function(){
    var list = find('.pretty-color');
    equal(list.length, 3);
    equal(list.first().text(), 'Pretty Color: purple\n');
  });
});

this passes

if I change the 3 to a 2:
test('component output is rendered', function(){
  expect(2);

  visit('/component-test').then(function(){
    var list = find('.pretty-color');
    equal(list.length, 2);
    equal(list.first().text(), 'Pretty Color: purple\n');
  });
});

it will now fail with the error:
Running "testem:ci:basic" (testem:ci) task
not ok 1 PhantomJS 1.9 - Acceptances - Component: component output is rendered
Fatal error: Object 3 has no method 'split'

This only fails with this bizarre error with the reporter:'tap' enabled.

if I change the code to:
var listLength = "" + list.length;
equal(listLength, "2");
then it works (tells me should have been "3" but it was "2")

Not sure how this bug could have existed for all this time without anyone reporting it since it makes reporter:tap completely unusable.


Reply all
Reply to author
Forward
0 new messages