var test = require('tape');
var tapeworm = require('../');

tapeworm.infect(test);

test('infect should inject a custom favicon into the DOM', function (t) {
  var favicon = document.querySelector('link[rel="icon"]');
  var faviconHref = favicon.getAttribute('href');

  t.equal(true, !!favicon, 'favicon element exists');
  t.equal(
    true,
    /^data:image\/png;base64,/.test(faviconHref),
    'favicon href is a base64 png'
  );
  t.end();
});

test('infect should add a method html to t', function (t) {
  t.equal(typeof t.html, 'function', 't.html is defined');
  t.end();
});



@@ -21,16 +21,46 @@
 tape');%0A
+var sinon = require('sinon');%0A
 var tape
@@ -608,9 +608,194 @@
 );%0A%7D);%0A%0A
+test('t.html should call console log', function (t) %7B%0A  sinon.spy(console, 'log');%0A  t.html('%3Cdiv%3E%3C/div%3E');%0A  t.equal(1, console.log.callCount);%0A  t.end();%0A  console.log.restore();%0A%7D);%0A
 %0A

Add test to make sure console log is hijacked