Skip to content

Commit 432f1d2

Browse files
committed
add test for missing host and port
1 parent 85eb960 commit 432f1d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/unit/utils.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('utils', () => {
2020
jest.restoreAllMocks();
2121
});
2222

23+
it('should throw an error if host or port are not defined', () => {
24+
expect(() => utils.getUrlAndHeaders(null, null, {}, '', '')).toThrow('Host and port are required');
25+
});
26+
2327
it('should return the url and header for connection to Neptune', () => {
2428
const host = 'local.host';
2529
const port = 1337;

0 commit comments

Comments
 (0)