mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 12:30:06 +00:00
style: lint
This commit is contained in:
@@ -1341,7 +1341,10 @@ export class SASViyaApiClient {
|
|||||||
const sourceFolderUri = await this.getFolderUri(sourceFolder, accessToken)
|
const sourceFolderUri = await this.getFolderUri(sourceFolder, accessToken)
|
||||||
|
|
||||||
// checks if 'targetParentFolder' is already a URI
|
// checks if 'targetParentFolder' is already a URI
|
||||||
const targetParentFolderUri = await this.getFolderUri(targetParentFolder, accessToken)
|
const targetParentFolderUri = await this.getFolderUri(
|
||||||
|
targetParentFolder,
|
||||||
|
accessToken
|
||||||
|
)
|
||||||
|
|
||||||
const sourceFolderId = sourceFolderUri?.split('/').pop()
|
const sourceFolderId = sourceFolderUri?.split('/').pop()
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ describe('FolderOperations', () => {
|
|||||||
'https://sample.server.com',
|
'https://sample.server.com',
|
||||||
'/Public',
|
'/Public',
|
||||||
'Context',
|
'Context',
|
||||||
function() {}
|
function () {}
|
||||||
)
|
)
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
@@ -33,7 +33,9 @@ describe('FolderOperations', () => {
|
|||||||
json: () => Promise.resolve(sampleResponse),
|
json: () => Promise.resolve(sampleResponse),
|
||||||
ok: true,
|
ok: true,
|
||||||
headers: {
|
headers: {
|
||||||
get: function() { return '' }
|
get: function () {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -44,11 +46,14 @@ describe('FolderOperations', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('should move folder successfully', async (done) => {
|
it('should move folder successfully', async (done) => {
|
||||||
let res: any = await sasViyaApiClient.moveFolder('/Test/test', '/Test/toFolder', 'toFolder', 'token')
|
let res: any = await sasViyaApiClient.moveFolder(
|
||||||
|
'/Test/test',
|
||||||
expect(JSON.stringify(res)).toEqual(
|
'/Test/toFolder',
|
||||||
JSON.stringify(sampleResponse)
|
'toFolder',
|
||||||
|
'token'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
expect(JSON.stringify(res)).toEqual(JSON.stringify(sampleResponse))
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user