Untransform should treat Array's as nested objects (#1416)
This commit is contained in:
@@ -147,6 +147,14 @@ describe('untransformObject', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('nested array', (done) => {
|
||||
var input = {arr: [{_testKey: 'testValue' }]};
|
||||
var output = transform.untransformObject(dummySchema, null, input);
|
||||
expect(Array.isArray(output.arr)).toEqual(true);
|
||||
expect(output.arr).toEqual([{ _testKey: 'testValue'}]);
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('transformKey', () => {
|
||||
|
||||
Reference in New Issue
Block a user