Skip to content

Commit

Permalink
Merge pull request #55 from palantir/release/2.0.0
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
themadcreator authored Feb 13, 2017
2 parents 9154683 + 7cf25ad commit 427ff4b
Show file tree
Hide file tree
Showing 3 changed files with 562 additions and 121 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svg-typewriter",
"version": "1.1.0",
"version": "2.0.0",
"description": "SVG Text Measurement Line Wrapper",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down
14 changes: 11 additions & 3 deletions test/domTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,21 @@ describe("Utils.DOM Test Suite", () => {
noneSVG.remove();
});

it("transform works properly", () => {
it("transform before setting returns null", () => {
const svg = generateSVG();
const translate = "translate(0, 0)";
const rect = svg.append("rect");
assert.equal(DOM.transform(rect), null);
svg.remove();
});

// This test is disabled because translations are stringified inconsistently
// across browsers. For example, some will drop the comma, and others will
// convert "translate(0, 0)" to "translate(0)"
xit("setting transform works properly", () => {
const svg = generateSVG();
const rect = svg.append("rect");
DOM.transform(rect, 0, 0);
assert.equal(DOM.transform(rect), translate);
assert.equal(DOM.transform(rect), "translate(0, 0)");
svg.remove();
});
});
Loading

1 comment on commit 427ff4b

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pull request #55 from palantir/release/2.0.0

Preview: docs | dev

Please sign in to comment.