Skip to content

Commit b5d87a7

Browse files
committed
fix(tests): Adjust tests for updated webdav library
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent a4eb5d4 commit b5d87a7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

apps/files/src/services/Files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { File, Folder, davParsePermissions, davGetDefaultPropfind } from '@nextc
2727
import { generateRemoteUrl } from '@nextcloud/router'
2828
import { getCurrentUser } from '@nextcloud/auth'
2929

30-
import { getClient, rootPath } from './WebdavClient'
30+
import { getClient, rootPath } from './WebdavClient.ts'
3131
import { hashCode } from '../utils/hashUtils'
3232
import logger from '../logger'
3333

apps/files/src/services/WebdavClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22-
import type { RequestOptions, Response } from 'webdav'
22+
import type { RequestOptions, Response, WebDAVClientContext } from 'webdav'
2323

2424
import { createClient, getPatcher } from 'webdav'
2525
import { generateRemoteUrl } from '@nextcloud/router'
@@ -45,12 +45,12 @@ export const getClient = (rootUrl = defaultRootUrl) => {
4545
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
4646
// @ts-ignore
4747
// https://github.com/perry-mitchell/hot-patcher/issues/6
48-
patcher.patch('request', (options: RequestOptions): Promise<Response> => {
48+
patcher.patch('request', (options: RequestOptions, context: WebDAVClientContext): Promise<Response> => {
4949
if (options.headers?.method) {
5050
options.method = options.headers.method
5151
delete options.headers.method
5252
}
53-
return request(options)
53+
return request(options, context)
5454
})
5555
return client
5656
}

jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const ignorePatterns = [
3333
'char-regex',
3434
'hot-patcher',
3535
'is-svg',
36+
'layerr',
3637
'mime',
3738
'p-cancelable',
3839
'p-limit',

0 commit comments

Comments
 (0)