Skip to content

Commit

Permalink
Add test for word boundaries (#127)
Browse files Browse the repository at this point in the history
Detection of word boundaries used hyphens as word boundaries instead of ignoring them. 

Fix was done in package `duereg/too-wordy`

fixes: #112
  • Loading branch information
HonzaMac authored Feb 8, 2021
1 parent 599296a commit 519bb6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/basic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ describe('writeGood', () => {
it('should ignore white-listed words', () => {
expect(writeGood('Never write read-only sentences.', { whitelist: ['read-only'] })).toEqual([]);
});

it('should parse words boundaries with dash correctly', () => {
expect(writeGood('A transfer visa may be required at check-in between any connecting flight.')).toEqual([
{ index: 20, offset: 11, reason: '"be required" may be passive voice' }
]);
});
});

describe('annotate', () => {
Expand Down

0 comments on commit 519bb6a

Please sign in to comment.