mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-10 13:50:05 +00:00
chore: added special missing test
This commit is contained in:
@@ -54,6 +54,17 @@ describe('formatDataForRequest', () => {
|
|||||||
expect(formatDataForRequest(data)).toEqual(expectedOutput)
|
expect(formatDataForRequest(data)).toEqual(expectedOutput)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should accept . as special missing value', () => {
|
||||||
|
let tableWithMissingValues = {
|
||||||
|
[testTable]: [{ var: '.' }, { var: 0 }],
|
||||||
|
[`$${testTable}`]: { formats: { var: 'best.' } }
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(() =>
|
||||||
|
formatDataForRequest(tableWithMissingValues)
|
||||||
|
).not.toThrowError()
|
||||||
|
})
|
||||||
|
|
||||||
it('should throw an error if special missing values is not valid', () => {
|
it('should throw an error if special missing values is not valid', () => {
|
||||||
let tableWithMissingValues = {
|
let tableWithMissingValues = {
|
||||||
[testTable]: [{ var: 'AA' }, { var: 0 }],
|
[testTable]: [{ var: 'AA' }, { var: 0 }],
|
||||||
|
|||||||
Reference in New Issue
Block a user