From 1188e153f11b62a2b720b08a0540074594cc4013 Mon Sep 17 00:00:00 2001 From: maoznir Date: Mon, 22 Jun 2020 13:23:16 +0300 Subject: [PATCH 1/2] Add test for variable names --- test/TransformationTest.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/TransformationTest.js b/test/TransformationTest.js index 26aae61..2dc8694 100644 --- a/test/TransformationTest.js +++ b/test/TransformationTest.js @@ -85,4 +85,16 @@ describe("Transformation", () => { "http://res.cloudinary.com/demo/image/upload/l_text:arial_20_antialias_best_hinting_medium:Cloudinary%20features/sample" ); }); + it("should not change variable names even if they are keywords", function() { + let tag = shallow( + + + + + ); + expect(tag.name()).to.equal("img"); + expect(tag.state("url")).to.equal( + "http://res.cloudinary.com/demo/image/upload/$width_10/c_scale,w_$width_add_10_add_w/sample" + ); + }) }); From ba8e00326cc163f1c7a243b3f90ef0407e39d5f9 Mon Sep 17 00:00:00 2001 From: maoznir Date: Mon, 22 Jun 2020 13:24:42 +0300 Subject: [PATCH 2/2] Format test code --- test/TransformationTest.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/TransformationTest.js b/test/TransformationTest.js index 2dc8694..b8363c8 100644 --- a/test/TransformationTest.js +++ b/test/TransformationTest.js @@ -85,16 +85,16 @@ describe("Transformation", () => { "http://res.cloudinary.com/demo/image/upload/l_text:arial_20_antialias_best_hinting_medium:Cloudinary%20features/sample" ); }); - it("should not change variable names even if they are keywords", function() { + it("should not change variable names even if they are keywords", function () { let tag = shallow( - - + + ); expect(tag.name()).to.equal("img"); expect(tag.state("url")).to.equal( "http://res.cloudinary.com/demo/image/upload/$width_10/c_scale,w_$width_add_10_add_w/sample" ); - }) + }); });