Skip to content

Commit

Permalink
test: add applicable test for the resetDefaultDictionary method
Browse files Browse the repository at this point in the history
Resolves: #29
  • Loading branch information
M-Scott-Lassiter committed Apr 30, 2022
1 parent 9166bd8 commit a67ef00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ describe('Dictionary Validation', () => {
expect(encoder.dictionary).toBe('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
})

test('Resetting the dictionary after changing it should be capital alphabet again', () => {
encoder.dictionary = 'ABCD'
encoder.resetDefaultDictionary()
expect(encoder.dictionary).toBe('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
})

test('Dictionary cannot be an empty string', () => {
expect(() => {
encoder.dictionary = ''
Expand Down

0 comments on commit a67ef00

Please sign in to comment.