yield.js 289 字节
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/yield.js');

test('yield', function (t) {
    t.plan(1);
    t.deepEqual(mine(src), [
      {name: 'a', offset: 17}, 
      {name: 'c', offset: 45}
    ]);
});