1234567891011121314151617181920212223242526272829303132333435363738 |
- import { describe, expect, it } from 'vitest'
- import Core from '@uppy/core'
- import Tus from './index.ts'
- describe('Tus', () => {
- it('Throws errors if autoRetry option is true', () => {
- const uppy = new Core()
- expect(() => {
- // @ts-expect-error removed
- uppy.use(Tus, { autoRetry: true })
- }).toThrowError(
- /The `autoRetry` option was deprecated and has been removed/,
- )
- })
- it('Throws errors if autoRetry option is false', () => {
- const uppy = new Core()
- expect(() => {
- // @ts-expect-error removed
- uppy.use(Tus, { autoRetry: false })
- }).toThrowError(
- /The `autoRetry` option was deprecated and has been removed/,
- )
- })
- it('Throws errors if autoRetry option is `undefined`', () => {
- const uppy = new Core()
- expect(() => {
- // @ts-expect-error removed
- uppy.use(Tus, { autoRetry: undefined })
- }).toThrowError(
- /The `autoRetry` option was deprecated and has been removed/,
- )
- })
- })
|