diff --git a/test/unit/defaults.spec.js b/test/unit/defaults.spec.js index 86e0668..f09c163 100644 --- a/test/unit/defaults.spec.js +++ b/test/unit/defaults.spec.js @@ -9,11 +9,11 @@ describe('drake defaults', () => { expect(typeof options.accepts).toBe('function') expect(typeof options.invalid).toBe('function') expect(typeof options.isContainer).toBe('function') - expect(options.copy).toBe(false) - expect(options.revertOnSpill).toBe(false) - expect(options.removeOnSpill).toBe(false) - expect(options.direction).toBe('vertical') - expect(options.mirrorContainer).toBe(document.body) + expect(options.copy).toBe(false, 'copy') + expect(options.revertOnSpill).toBe(true, 'revertOnSpill') + expect(options.removeOnSpill).toBe(false, 'removeOnSpill') + expect(options.direction).toBe('vertical', 'direction') + expect(options.mirrorContainer).toBe(document.body, 'mirrorContainer') }) it('still has sensible options when combined with dragula', () => { @@ -24,11 +24,11 @@ describe('drake defaults', () => { expect(typeof dragula.options.accepts).toBe('function') expect(typeof dragula.options.invalid).toBe('function') expect(typeof dragula.options.isContainer).toBe('function') - expect(dragula.options.copy).toBe(false) - expect(dragula.options.revertOnSpill).toBe(false) - expect(dragula.options.removeOnSpill).toBe(false) - expect(dragula.options.direction).toBe('vertical') - expect(dragula.options.mirrorContainer).toBe(document.body) + expect(dragula.options.copy).toBe(false, 'copy') + expect(dragula.options.revertOnSpill).toBe(true, 'revertOnSpill') + expect(dragula.options.removeOnSpill).toBe(false, 'removeOnSpill') + expect(dragula.options.direction).toBe('vertical', 'direction') + expect(dragula.options.mirrorContainer).toBe(document.body, 'mirrorContainer') }) it('combine with the supplied options correctly', function () { diff --git a/test/unit/dragulaanddrop.spec.js b/test/unit/dragulaanddrop.spec.js index 0143857..4c4a484 100644 --- a/test/unit/dragulaanddrop.spec.js +++ b/test/unit/dragulaanddrop.spec.js @@ -20,16 +20,11 @@ describe('the Dragula and Drop Custom Element', function () { this.container.classList.add('drag-source') this.container.classList.add('drop-target') - this.commentBegin = document.createComment('') - this.commentEnd = document.createComment('') + this.commentAnchor = document.createComment('anchor') - this.container.appendChild(this.commentBegin) this.container.appendChild(this.item) - this.container.appendChild(this.commentEnd) - - this.container.appendChild(this.commentBegin) this.container.appendChild(this.sibling) - this.container.appendChild(this.commentEnd) + this.container.appendChild(this.commentAnchor) document.body.appendChild(this.container)