Skip to content

Commit

Permalink
Feat: add extra test to check if there are more than 1 12-letter word
Browse files Browse the repository at this point in the history
  • Loading branch information
hepabolu committed Oct 1, 2024
1 parent 7d5a260 commit 9c34676
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/lib/statistics.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,24 @@ describe('Test class Statistics', () => {
});
});

test('returns a list larger than 1 word if min and max are greater than 12', () => {
const mockConfig = {
num_words: 1,
word_length_min: 12,
word_length_max: 20,
separator_type: 'NONE',
padding_digits_before: 3,
padding_digits_after: 3,
padding_character_type: 'RANDOM',
case_transform: 'CAPITALISE',
};

const me = new Statistics(mockConfig, mockDict);

const result = me.__calculateDictionaryStats();
expect(result).toBeDefined();
expect(result.numWordsFiltered).toEqual(12);
});
});

describe('Test function configStats', () => {
Expand Down

0 comments on commit 9c34676

Please sign in to comment.