dom.js 416 B

123456789101112131415
  1. var inspect = require('../../');
  2. var test = require('tape');
  3. test('dom element', function (t) {
  4. t.plan(1);
  5. var d = document.createElement('div');
  6. d.setAttribute('id', 'beep');
  7. d.innerHTML = '<b>wooo</b><i>iiiii</i>';
  8. t.equal(
  9. inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]),
  10. '[ <div id="beep">...</div>, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]'
  11. );
  12. });