Skip to content

Commit

Permalink
test: ensure undefined parameters not present in URL
Browse files Browse the repository at this point in the history
Co-authored-by: Frederick Fogerty <[email protected]>
  • Loading branch information
luqven and Frederick Fogerty committed Jun 15, 2021
1 parent 8673f01 commit 85d054c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test-buildURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,5 +346,13 @@ describe('URL Builder:', function describeSuite() {

assert.strictEqual(actual, expected);
});

it('should not include undefined parameters in url', function testSpect() {
const actual = client.buildURL('test.jpg', { ar: undefined, txt: null });
assert(!actual.includes('ar=undefined'));
assert(!actual.includes('ar=null'));
assert(!actual.includes('txt=undefined'));
assert(!actual.includes('txt=null'));
});
});
});

0 comments on commit 85d054c

Please sign in to comment.