Some updates to fix tests
This commit is contained in:
@@ -114,13 +114,6 @@ describe('untransformObject', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('null file', (done) => {
|
|
||||||
var input = {picture: null};
|
|
||||||
var output = transform.untransformObject(dummySchema, null, input);
|
|
||||||
expect(output.picture).toBeUndefined();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('geopoint', (done) => {
|
it('geopoint', (done) => {
|
||||||
var input = {location: [180, -180]};
|
var input = {location: [180, -180]};
|
||||||
var output = transform.untransformObject(dummySchema, null, input);
|
var output = transform.untransformObject(dummySchema, null, input);
|
||||||
@@ -131,12 +124,6 @@ describe('untransformObject', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('null geopoint', (done) => {
|
|
||||||
var input = {location: null};
|
|
||||||
var output = transform.untransformObject(dummySchema, null, input);
|
|
||||||
expect(output.location).toBeUndefined();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('transformKey', () => {
|
describe('transformKey', () => {
|
||||||
|
|||||||
@@ -692,8 +692,8 @@ function untransformObject(schema, className, mongoObject) {
|
|||||||
break;
|
break;
|
||||||
} else if (key[0] == '_' && key != '__type') {
|
} else if (key[0] == '_' && key != '__type') {
|
||||||
throw ('bad key in untransform: ' + key);
|
throw ('bad key in untransform: ' + key);
|
||||||
} else if (mongoObject[key] === null) {
|
//} else if (mongoObject[key] === null) {
|
||||||
break;
|
//break;
|
||||||
} else {
|
} else {
|
||||||
var expected = schema.getExpectedType(className, key);
|
var expected = schema.getExpectedType(className, key);
|
||||||
if (expected == 'file') {
|
if (expected == 'file') {
|
||||||
|
|||||||
Reference in New Issue
Block a user