www_hero/node_modules/detective/test/word.js

13 lines
318 B
JavaScript
Raw Normal View History

2024-05-03 04:39:20 +00:00
var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/word.js');
test('word', function (t) {
t.deepEqual(
detective(src, { word : 'load' }),
[ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]
);
t.end();
});