Skip to content

Commit

Permalink
fix: update testbackend to use identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
darthtrevino committed Mar 7, 2019
1 parent 7dd475c commit 5a4005b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react-dnd-test-backend/src/TestBackend.ts
Expand Up @@ -6,15 +6,16 @@ import {
Backend,
BeginDragOptions,
HoverOptions,
Identifier,
} from 'dnd-core'
const noop = require('lodash/noop')

export interface TestBackend {
didCallSetup: boolean
didCallTeardown: boolean
simulateBeginDrag(sourceIds: string[], options?: any): void
simulateBeginDrag(sourceIds: Identifier[], options?: any): void
simulatePublishDragSource(): void
simulateHover(targetIds: string[], options?: any): void
simulateHover(targetIds: Identifier[], options?: any): void
simulateDrop(): void
simulateEndDrag(): void
}
Expand Down Expand Up @@ -48,15 +49,15 @@ export default class TestBackendImpl implements Backend, TestBackend {
return noop
}

public simulateBeginDrag(sourceIds: string[], options: BeginDragOptions) {
public simulateBeginDrag(sourceIds: Identifier[], options: BeginDragOptions) {
this.actions.beginDrag(sourceIds, options)
}

public simulatePublishDragSource() {
this.actions.publishDragSource()
}

public simulateHover(targetIds: string[], options: HoverOptions) {
public simulateHover(targetIds: Identifier[], options: HoverOptions) {
this.actions.hover(targetIds, options)
}

Expand Down

0 comments on commit 5a4005b

Please sign in to comment.