mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-08 21:10:05 +00:00
chore(lint): fixed linting issues
This commit is contained in:
@@ -119,7 +119,7 @@ const validateLog = (text: string, log: string): boolean => {
|
||||
const validate = (expectedProperties: string[], data: any): boolean => {
|
||||
const actualProperties = Object.keys(data)
|
||||
|
||||
const isValid = expectedProperties.every((property) =>
|
||||
const isValid = expectedProperties.every(property =>
|
||||
actualProperties.includes(property)
|
||||
)
|
||||
return isValid
|
||||
|
||||
@@ -86,7 +86,7 @@ export const sendArrTests = (adapter: SASjs): TestSuite => ({
|
||||
'Should error out with long string values over 32765 characters',
|
||||
test: () => {
|
||||
const data = getLongStringData(32767)
|
||||
return adapter.request('common/sendArr', data).catch((e) => e)
|
||||
return adapter.request('common/sendArr', data).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) => {
|
||||
return !!error && !!error.error && !!error.error.message
|
||||
@@ -182,7 +182,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
const invalidData: any = {
|
||||
'1InvalidTable': [{ col1: 42 }]
|
||||
}
|
||||
return adapter.request('common/sendObj', invalidData).catch((e) => e)
|
||||
return adapter.request('common/sendObj', invalidData).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) =>
|
||||
!!error && !!error.error && !!error.error.message
|
||||
@@ -194,7 +194,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
const invalidData: any = {
|
||||
'an invalidTable': [{ col1: 42 }]
|
||||
}
|
||||
return adapter.request('common/sendObj', invalidData).catch((e) => e)
|
||||
return adapter.request('common/sendObj', invalidData).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) =>
|
||||
!!error && !!error.error && !!error.error.message
|
||||
@@ -206,7 +206,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
const invalidData: any = {
|
||||
'anInvalidTable#': [{ col1: 42 }]
|
||||
}
|
||||
return adapter.request('common/sendObj', invalidData).catch((e) => e)
|
||||
return adapter.request('common/sendObj', invalidData).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) =>
|
||||
!!error && !!error.error && !!error.error.message
|
||||
@@ -219,7 +219,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: [{ col1: 42 }]
|
||||
}
|
||||
|
||||
return adapter.request('common/sendObj', invalidData).catch((e) => e)
|
||||
return adapter.request('common/sendObj', invalidData).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) =>
|
||||
!!error && !!error.error && !!error.error.message
|
||||
@@ -231,7 +231,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
const invalidData: any = {
|
||||
inData: [[{ data: 'value' }]]
|
||||
}
|
||||
return adapter.request('common/sendObj', invalidData).catch((e) => e)
|
||||
return adapter.request('common/sendObj', invalidData).catch(e => e)
|
||||
},
|
||||
assertion: (error: any) =>
|
||||
!!error && !!error.error && !!error.error.message
|
||||
@@ -265,7 +265,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
test: () => {
|
||||
return adapter
|
||||
.request('common/sendObj', getLongStringData(32767))
|
||||
.catch((e) => e)
|
||||
.catch(e => e)
|
||||
},
|
||||
assertion: (error: any) => {
|
||||
return !!error && !!error.error && !!error.error.message
|
||||
|
||||
@@ -31,7 +31,7 @@ export const sasjsRequestTests = (adapter: SASjs): TestSuite => ({
|
||||
.catch(() => {
|
||||
const sasRequests = adapter.getSasRequests()
|
||||
const makeErrRequest: any =
|
||||
sasRequests.find((req) => req.serviceLink.includes('makeErr')) ||
|
||||
sasRequests.find(req => req.serviceLink.includes('makeErr')) ||
|
||||
null
|
||||
|
||||
if (!makeErrRequest) return false
|
||||
@@ -41,7 +41,7 @@ export const sasjsRequestTests = (adapter: SASjs): TestSuite => ({
|
||||
)
|
||||
})
|
||||
},
|
||||
assertion: (response) => {
|
||||
assertion: response => {
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user