Skip to content

Commit 59e2aae

Browse files
committed
test: add string param test.
1 parent 62e20ee commit 59e2aae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

__TESTS__/unit/url/url.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ describe('Tests for URL configuration', () => {
101101
expect(url).toEqual(`https://res.cloudinary.com/demo/image/upload/sample?_i=abcde&_z=1234&_t=false`);
102102
});
103103

104+
//just added for playground
105+
it('Should include query params', function () {
106+
const image = createNewImage('sample', {cloudName: 'demo'}, {queryParams: '_i=abcde&_t=false'}});
107+
const url = image.toURL();
108+
expect(url).toEqual(`https://res.cloudinary.com/demo/image/upload/sample?_i=abcde&_z=1234&_t=false`);
109+
});
110+
104111
it('Should include query params with analytics', function () {
105112
const image = createNewImage('sample', {cloudName: 'demo'}, {analytics: true, queryParams: {"_i": "abcde"}});
106113
const analyticsOptions = {

0 commit comments

Comments
 (0)