nested.js 319 字节
Newer Older
Five-菜鸟级's avatar
init  
Five-菜鸟级 已提交
1 2 3 4 5 6 7 8 9 10 11 12
var test = require('tap').test;
var mine = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/nested.js');

test('nested', function (t) {
    t.deepEqual(mine(src), [
      {name: 'a', offset: 49}, 
      {name: 'b', offset: 169}, 
      {name: 'c', offset: 281} ]);
    t.end();
});