Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f99482

Browse files
committed
test: guard invalid message objects
1 parent ffaa74d commit 8f99482

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/unit/index.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('createMessageHelpers', () => {
2424
const helpers = createMessageHelpers({ service });
2525

2626
expect(() => helpers.decodeMessage({ message: 'Title\n\n' })).toThrow(TypeError);
27+
expect(service.decode).not.toHaveBeenCalled();
2728
});
2829

2930
it('honors body format options for trailing newline', () => {

0 commit comments

Comments
 (0)