From c1cb3c284eff4907830116afc41f7f35d63be10f Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 9 Sep 2015 00:29:04 -0700 Subject: [PATCH] Add a test for using a custom document --- test/unit.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit.spec.js b/test/unit.spec.js index fc3229d..e8f05a7 100644 --- a/test/unit.spec.js +++ b/test/unit.spec.js @@ -46,6 +46,12 @@ describe('canvas2svg', function() { }); + it("can be created on another document", function () { + var otherDoc = document.implementation.createHTMLDocument(); + var ctx = C2S({document: otherDoc}); + expect(ctx.getSvg().ownerDocument).to.equal(otherDoc); + }); + }); describe("can export to", function() {