Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dom.js « browser « test « object-inspect « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 210c0b233e9f72c5733ef80fa38a3e8a315e5c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var inspect = require('../../');
var test = require('tape');

test('dom element', function (t) {
    t.plan(1);

    var d = document.createElement('div');
    d.setAttribute('id', 'beep');
    d.innerHTML = '<b>wooo</b><i>iiiii</i>';

    t.equal(
        inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]),
        '[ <div id="beep">...</div>, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]'
    );
});