lix-website/themes/lix/assets/bootstrap/node_modules/traverse/test/obj.js

16 lines
346 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
var assert = require('assert');
var Traverse = require('traverse');
exports['traverse an object with nested functions'] = function () {
var to = setTimeout(function () {
assert.fail('never ran');
}, 1000);
function Cons (x) {
clearTimeout(to);
assert.equal(x, 10);
};
Traverse(new Cons(10));
};