fix tests
This commit is contained in:
parent
280bf22ad8
commit
51c412e82e
|
@ -224,13 +224,13 @@ function getPOS(text, callback) {
|
|||
var args = [data];
|
||||
var matches = uniq(flat(Object.values(data)));
|
||||
data.rest = diff(words, matches);
|
||||
|
||||
profile && args.push(new Date() - start);
|
||||
nextTick(callback, args);
|
||||
return data;
|
||||
}
|
||||
|
||||
function error(err) {
|
||||
console.log('Error >>> ', err);
|
||||
nextTick(callback, []);
|
||||
throw err;
|
||||
}
|
||||
|
|
|
@ -62,8 +62,7 @@ describe('CLI tests', function() {
|
|||
it('should get POS', done => {
|
||||
exec(cmd + '-b get ' + testStr, (error, stdout, stderr) => {
|
||||
assert.isNull(error);
|
||||
assert.equal(stdout.trim(),
|
||||
'bear chased little squirrel \n' +
|
||||
cmp(stdout, 'bear chased squirrel little \n' +
|
||||
'angry frightened little \n' +
|
||||
'bear \n' +
|
||||
'little');
|
||||
|
|
|
@ -56,7 +56,7 @@ var str = "The angry bear chased the frightened little squirrel",
|
|||
verbs: [ 'bear' ],
|
||||
adjectives: [ 'little', 'angry', 'frightened' ],
|
||||
adverbs: [ 'little' ],
|
||||
rest: [ 'The' ]
|
||||
rest: []
|
||||
},
|
||||
garble = 'garblegarble', // expect not to find word
|
||||
offset = 1285602;
|
||||
|
|
Loading…
Reference in New Issue