({ bundle = false }: { bundle?: boolean } = {})
| 18 | let uppy: Uppy | undefined |
| 19 | |
| 20 | function createUppy({ bundle = false }: { bundle?: boolean } = {}) { |
| 21 | const target = document.createElement('div') |
| 22 | document.body.appendChild(target) |
| 23 | |
| 24 | uppy = new Uppy({ debug: true }) |
| 25 | .use(Dashboard, { |
| 26 | target, |
| 27 | inline: true, |
| 28 | }) |
| 29 | .use(XHRUpload, { |
| 30 | endpoint: 'http://localhost/upload', |
| 31 | bundle, |
| 32 | }) |
| 33 | |
| 34 | return uppy |
| 35 | } |
| 36 | |
| 37 | function createMockFile(name: string, size: number = 16) { |
| 38 | return new File(['a'.repeat(size)], name, { type: 'text/plain' }) |
no test coverage detected
searching dependent graphs…