UNPKG

compound-ex4

Version:

Compound-ex4 - MVC framework for NodeJS (ExpressJs 4 version), fork compoundjs(https://github.com/1602/compound)

30 lines (24 loc) 589 B
var test = require('tap').test; var bunker = require('../'); test('cover', function (t) { t.plan(1); var b = bunker('(' + function () { function foo () {} function bar () {} (function () { return foo(); })(); } + ')()'); var counts = {}; b.on('node', function (node) { counts[node.name] = (counts[node.name] || 0) + 1; }); b.run(); process.nextTick(function () { t.same(counts, { stat : 2, call : 2, return : 1, }); }); });