Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Mar 1, 2019
1 parent b4e65ec commit c5cfd38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
20 changes: 10 additions & 10 deletions test/unit/defaults.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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 () {
Expand Down
9 changes: 2 additions & 7 deletions test/unit/dragulaanddrop.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('<view>')
this.commentEnd = document.createComment('</view>')
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)

Expand Down

0 comments on commit c5cfd38

Please sign in to comment.