github-pages-deploy-action/node_modules/object-inspect/test/browser/dom.js

16 lines
416 B
JavaScript
Raw Normal View History

2020-01-28 13:08:03 +08:00
var inspect = require('../../');
var test = require('tape');
test('dom element', function (t) {
t.plan(1);
2020-03-07 11:45:40 +08:00
2020-01-28 13:08:03 +08:00
var d = document.createElement('div');
d.setAttribute('id', 'beep');
d.innerHTML = '<b>wooo</b><i>iiiii</i>';
2020-03-07 11:45:40 +08:00
2020-01-28 13:08:03 +08:00
t.equal(
2020-03-07 11:45:40 +08:00
inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]),
2020-01-28 13:08:03 +08:00
'[ <div id="beep">...</div>, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]'
);
});