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

test('chained', function (t) {
    t.deepEqual(mine(src), [
        {name: 'c', offset: 11}, 
        {name: 'b', offset: 42},
        {name: 'a', offset: 63}
    ]);
    t.end();
});