diff --git a/test/TransformationTest.js b/test/TransformationTest.js index a9b1104..26aae61 100644 --- a/test/TransformationTest.js +++ b/test/TransformationTest.js @@ -58,4 +58,31 @@ describe("Transformation", () => { expect(image.props().src).to.equal('http://res.cloudinary.com/demo/image/upload/c_scale,w_200/sample'); }); + it("should accept font antialiasing and hinting in overlay object or overlay text", function() { + let image = shallow(); + + const transformOverlayObject = ( + + ); + image.setProps({ children: [transformOverlayObject] }); + expect(image.props().src).to.equal( + "http://res.cloudinary.com/demo/image/upload/l_text:Arial_18_antialias_best_hinting_medium:Hello%20World%252C%20Nice%20to%20meet%20you%3F/sample" + ); + + const transformOverlayString = ( + + ); + image.setProps({ children: [transformOverlayString] }); + expect(image.props().src).to.equal( + "http://res.cloudinary.com/demo/image/upload/l_text:arial_20_antialias_best_hinting_medium:Cloudinary%20features/sample" + ); + }); });