1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-04 11:10:05 +00:00

chore: tests fix

This commit is contained in:
2021-06-22 17:05:13 +02:00
parent 8cf249e8fd
commit d53d1e1e6a
2 changed files with 9 additions and 3 deletions

View File

@@ -68,6 +68,8 @@ export class FileUploader {
result =
typeof res.result === 'string' ? JSON.parse(res.result) : res.result
return result
//TODO: append to SASjs requests
})
.catch((err: Error) => {

View File

@@ -3,7 +3,7 @@
*/
import { FileUploader } from '../FileUploader'
import { UploadFile } from '../types'
import { SASjsConfig, UploadFile } from '../types'
import { RequestClient } from '../request/RequestClient'
import axios from 'axios'
jest.mock('axios')
@@ -32,9 +32,13 @@ const prepareFilesAndParams = () => {
}
describe('FileUploader', () => {
const config: SASjsConfig = {
...new SASjsConfig(),
appLoc: '/sample/apploc'
}
const fileUploader = new FileUploader(
'/sample/apploc',
'https://sample.server.com',
config,
'/jobs/path',
new RequestClient('https://sample.server.com')
)