mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
24 lines
496 B
JavaScript
24 lines
496 B
JavaScript
import AbstractPlugin from 'shared/AbstractPlugin';
|
|
|
|
export class TestPlugin extends AbstractPlugin {
|
|
constructor(draggable) {
|
|
super(draggable);
|
|
|
|
jest.spyOn(this, 'attachFunction').mockImplementation();
|
|
jest.spyOn(this, 'detachFunction').mockImplementation();
|
|
}
|
|
|
|
attach() {
|
|
this.attachFunction();
|
|
}
|
|
|
|
detach() {
|
|
this.detachFunction();
|
|
}
|
|
|
|
/* eslint-disable no-empty-function */
|
|
attachFunction() {}
|
|
detachFunction() {}
|
|
/* eslint-enable no-empty-function */
|
|
}
|