Skip to content

Commit b43cd74

Browse files
committed
fix: Modified test case to check explicitly for query params in transformation
1 parent b5f22dd commit b43cd74

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sdk/src/sdk-tests/ik-image.component.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ describe("IkImageComponent", () => {
8282
});
8383

8484
it("if SRC is used to create URL, transformartioPosition should be query", () => {
85-
const config = component.getConfigObject('abc');
86-
expect(config['transformationPosition']).toBe('query')
85+
// const config = component.getConfigObject('abc');
86+
const transformation = [{ height: "200", width: "200" }, { rotation: "90"}];
87+
component.setUrl("https://abc.com/def", null, transformation);
88+
// expect(config['transformationPosition']).toBe('query')
89+
expect(component.url).toContain('&tr=');
8790
});
8891

8992
it("if SRC is used to create URL, transformartioPosition should be query even if anything else is passed", () => {

sdk/src/sdk-tests/imagekit.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("ImagekitService", () => {
1212
});
1313
})
1414

15-
it("The url returned should have parameter with the value", () => {
15+
it("The url returned should have sdk version parameter with the value", () => {
1616
expect(imagekitService.getUrl({src: 'abc'})).toContain(`ik-sdk-version=${version}`)
1717
});
1818
});

0 commit comments

Comments
 (0)