Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Apr 17, 2024
1 parent 6bb7125 commit 5140f07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/@uppy/companion/test/__tests__/companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ it('periodically pings', (done) => {
getServer({
COMPANION_PERIODIC_PING_URLS: 'http://localhost/ping',
COMPANION_PERIODIC_PING_STATIC_JSON_PAYLOAD: '{"some": "value"}',
COMPANION_PERIODIC_PING_INTERVAL: '100',
COMPANION_PERIODIC_PING_INTERVAL: '10',
COMPANION_PERIODIC_PING_COUNT: '1',
})
}, 3000)
Expand Down
8 changes: 3 additions & 5 deletions packages/@uppy/companion/test/__tests__/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@

jest.mock('tus-js-client')

const { Readable } = require('node:stream')
const fs = require('node:fs')
const nock = require('nock')
const { Readable } = require('node:stream')

const Uploader = require('../../src/server/Uploader')
const socketClient = require('../mocksocket')
const standalone = require('../../src/standalone')
const Emitter = require('../../src/server/emitter')


afterAll(() => {
nock.cleanAll()
nock.restore()
})

process.env.COMPANION_DATADIR = './test/output'
process.env.COMPANION_DOMAIN = 'localhost:3020'
// process.env.COMPANION_STREAMING_UPLOAD = 'true'
const { companionOptions } = standalone()

describe('uploader with tus protocol', () => {
Expand Down Expand Up @@ -207,8 +205,8 @@ describe('uploader with tus protocol', () => {
nock('http://localhost').post('/', formDataNoMetaMatch)
.reply(200)

const ret = await runMultipartTest({ useFormData: true, includeSize: false })
expect(ret).toMatchObject({ url: null, extraData: { response: expect.anything(), bytesUploaded: 17 } })
const ret = await runMultipartTest({ useFormData: true, includeSize: false })
expect(ret).toMatchObject({ url: null, extraData: { response: expect.anything(), bytesUploaded: 17 } })
})

// https://github.com/transloadit/uppy/issues/3477
Expand Down

0 comments on commit 5140f07

Please sign in to comment.