Skip to content

Commit 336fa8f

Browse files
author
RTLcoil
authored
Add test for normalizing reserved names (#209)
1 parent 10329a6 commit 336fa8f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/TransformationTest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ describe("Transformation", () => {
7979
it("should not change variable names even if they are keywords", function () {
8080
const image = shallow(
8181
<Image publicId="sample" cloudName="demo">
82-
<Transformation variables={[["$width", 10]]}/>
82+
<Transformation variables={[["$width", 10], ["$myheight", 20], ["$heightheight", 30], ["$theheight", 40], ["$__height", 50]]}/>
8383
<Transformation width="$width + 10 + width" crop="scale"/>
8484
</Image>
8585
);
8686
expect(image.name()).to.equal("img");
8787
expect(image.props().src).to.equal(
88-
"http://res.cloudinary.com/demo/image/upload/$width_10/c_scale,w_$width_add_10_add_w/sample"
88+
"http://res.cloudinary.com/demo/image/upload/$width_10,$myheight_20,$heightheight_30,$theheight_40,$__height_50/c_scale,w_$width_add_10_add_w/sample"
8989
);
9090
});
9191
});

0 commit comments

Comments
 (0)