From ddeaba99e2a8479aed345ec36cb84e5092df97cb Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 4 Oct 2018 14:36:33 +0200 Subject: [PATCH] test(append): simplify spec --- test/spec/append.js | 3 +-- test/spec/appendTo.js | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/spec/append.js b/test/spec/append.js index 0d0a76e..518e8ee 100644 --- a/test/spec/append.js +++ b/test/spec/append.js @@ -20,8 +20,7 @@ describe('append', function() { var result = append(container, svg); // then - expect(result).to.exist; - expect(result.nodeName.toLowerCase()).to.eql('div'); + expect(result).to.equal(container); expect(svg.parentNode).to.eql(result); }); diff --git a/test/spec/appendTo.js b/test/spec/appendTo.js index a9debcc..34baf98 100644 --- a/test/spec/appendTo.js +++ b/test/spec/appendTo.js @@ -14,13 +14,13 @@ describe('appendTo', function() { // given var container = createContainer(); + var svg = create('svg'); // when - var result = appendTo(create('svg'), container); + var result = appendTo(svg, container); // then - expect(result).to.exist; - expect(result.nodeName).to.eql('svg'); + expect(result).to.equal(svg); expect(result.parentNode).to.eql(container); });