UNPKG

uppy

Version:

Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:

35 lines (29 loc) 646 B
import Plugin from '../../src/core/Plugin' export default class TestSelector2 extends Plugin { constructor (uppy, opts) { super(uppy, opts) this.type = 'acquirer' this.id = 'TestSelector2' this.name = this.constructor.name this.mocks = { run: jest.fn(), update: jest.fn(), uninstall: jest.fn() } } run (results) { this.uppy.log({ class: this.constructor.name, method: 'run', results: results }) this.mocks.run(results) return Promise.resolve('success') } update (state) { this.mocks.update(state) } uninstall () { this.mocks.uninstall() } }