From 56542e5cda0b5ac4c9c26fb5c81dd48d3b44767d Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 22 Sep 2018 11:14:10 +0200 Subject: [PATCH] :white_check_mark: Updating tests --- src/pattern.js | 2 +- tests/pattern.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pattern.js b/src/pattern.js index 80328da17be..4d303194700 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -232,7 +232,7 @@ Pattern.prototype.sampleModels = function(models, focus = false) { let anchors = {}; let parts = this.sampleParts(); let run = 0; - let runs = models.length; + let runs = Object.keys(models).length; for (let l in models) { run++; this.settings.measurements = models[l]; diff --git a/tests/pattern.test.js b/tests/pattern.test.js index fcfc80dbeff..b5c320fcfda 100644 --- a/tests/pattern.test.js +++ b/tests/pattern.test.js @@ -168,11 +168,11 @@ it("Should sample models with focus", () => { expect(pattern.parts.a.paths.test_1.render).to.equal(true); expect(pattern.parts.b.paths.test_2.ops[1].to.x).to.equal(10); expect(pattern.parts.a.paths.test_1.attributes.get("class")).to.equal( - "sample sample-1 sample-focus" + "sample-focus" ); expect( - pattern.parts.b.paths.test_2.attributes.get("class") - ).to.equalIgnoreSpaces("sample sample-2"); + pattern.parts.b.paths.test_2.attributes.get("style") + ).to.equalIgnoreSpaces("stroke: hsl(165, 100%, 35%);"); }); it("Should register a hook via on", () => {