mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 04:20:05 +00:00
chore: grammar fixing
This commit is contained in:
@@ -1202,8 +1202,8 @@ export class SASViyaApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists a children folders for given Viya folder.
|
||||
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder listed. Providing URI instead of path will save one extra request.
|
||||
* Lists the child folders for a given Viya folder
|
||||
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder listed. Providing URI instead of the path will save one extra request.
|
||||
* @param accessToken - an access token for authorizing the request.
|
||||
*/
|
||||
public async listFolder(
|
||||
@@ -1239,7 +1239,7 @@ export class SASViyaApiClient {
|
||||
/**
|
||||
* Moves a Viya folder to a new location. The folder may be renamed at the same time.
|
||||
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder to be moved. Providing URI instead of path will save one extra request.
|
||||
* @param targetParentFolder - the full path or URI of the _parent_ folder to which the `sourceFolder` will be moved (eg `/Public/newDestination`). To move a folder, a user has to have write permissions in targetParentFolder. Providing URI instead of path will save one extra request.
|
||||
* @param targetParentFolder - the full path or URI of the _parent_ folder to which the `sourceFolder` will be moved (eg `/Public/newDestination`). To move a folder, a user has to have write permissions in targetParentFolder. Providing URI instead of the path will save one extra request.
|
||||
* @param targetFolderName - the name of the "moved" folder. If left blank, the original folder name will be used (eg `myFolder` in `/Public/newDestination/myFolder` for the example above). Optional field.
|
||||
* @param accessToken - an access token for authorizing the request.
|
||||
*/
|
||||
@@ -1249,7 +1249,7 @@ export class SASViyaApiClient {
|
||||
targetFolderName: string,
|
||||
accessToken: string
|
||||
) {
|
||||
// If target path is existing folder, than keep source folder name, othervise rename it with given target folder name
|
||||
// If the target path is an existing folder than keep the source folder name, otherwise rename it with the given target folder name
|
||||
const sourceFolderName = sourceFolder.split('/').pop() as string
|
||||
const targetFolderDetails = await this.getFolderDetails(
|
||||
targetParentFolder,
|
||||
|
||||
@@ -5,8 +5,6 @@ jest.mock('axios')
|
||||
const mockedAxios = axios as jest.Mocked<typeof axios>
|
||||
|
||||
describe('FolderOperations', () => {
|
||||
let originalFetch: any
|
||||
|
||||
const sasViyaApiClient = new SASViyaApiClient(
|
||||
'https://sample.server.com',
|
||||
'/Public',
|
||||
@@ -26,8 +24,6 @@ describe('FolderOperations', () => {
|
||||
'token'
|
||||
)
|
||||
|
||||
console.log(`[res]`, res)
|
||||
|
||||
expect(res.folder.name).toEqual('newName')
|
||||
expect(res.folder.parentFolderUri.split('=')[1]).toEqual('/Test/toFolder')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user