Skip to content

Conversation

@sdf611097
Copy link
Contributor

Is there any usage to use __type in obj?

Do I add further check, such as __type=="File" must contains url, name?

@facebook-github-bot
Copy link

@sdf611097 updated the pull request.

src/Schema.js Outdated
}
break;
case 'File' :
if(obj.url && obj.name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is actually the only required field on a file. In most cases, the url can & should be constructed during read. We were actually discussing making url required earlier today, but decided against it for now.

@facebook-github-bot
Copy link

@sdf611097 updated the pull request.

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

npm test should work.. can you provide any output you get?...

@sdf611097
Copy link
Contributor Author

I think I miss something, so that my test failed.

here is the output of npm test

npm test

[email protected] pretest /home/jim/parse-server
cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.0.8} ./node_modules/.bin/mongodb-runner start

◝ Starting a MongoDB deployment to test against...

[email protected] test /home/jim/parse-server
cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node ./node_modules/babel-istanbul/lib/cli.js cover -x /spec/ ./node_modules/jasmine/bin/jasmine.js

Started
FF....APNS Notification caused error: 1 for device {} undefined
APNS Notification caused error: 1 for device undefined {}
.APNS Notification caused error: 1 for device { connIndex: 0, appIdentifier: 'bundleId1' } {}
.APNS Notification caused error: 1 for device { connIndex: 2, appIdentifier: 'bundleId1' } {}
.APNS Notification caused error: 1 for device { connIndex: 1 } {}
(node) warning: possible EventEmitter memory leak detected. 11 uncaughtException listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at process.addListener (events.js:239:17)
at new ParseServer (/home/jim/parse-server/src/index.js:9:13170)
at configuration (/home/jim/parse-server/spec/helper.js:55:9)
at restoreServerConfiguration (/home/jim/parse-server/spec/helper.js:63:40)
at Object. (/home/jim/parse-server/spec/helper.js:80:3)
at attemptAsync (/home/jim/parse-server/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1916:24)
at QueueRunner.run (/home/jim/parse-server/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1871:9)
at /home/jim/parse-server/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1898:16
at /home/jim/parse-server/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1842:9
at Object. (/home/jim/parse-server/spec/APNS.spec.js:264:5)
....WrongAdapter {} { createFile: { expected: 'function', actual: 'undefined' },
deleteFile: { expected: 'function', actual: 'undefined' },
getFileData: { expected: 'function', actual: 'undefined' },
getFileLocation: { expected: 'function', actual: 'undefined' } }
.WrongAdapter {} { createFile: { expected: 'function', actual: 'undefined' },
deleteFile: { expected: 'function', actual: 'undefined' },
getFileData: { expected: 'function', actual: 'undefined' },
getFileLocation: { expected: 'function', actual: 'undefined' } }
.................................................................F..Unknown push type from installation {"deviceType":"win","deviceToken":"winToken"}
.Sending notification to 4 devices.
Unknown push type from installation {"deviceType":"win","deviceToken":"winToken"}
...Sending notification to 4 devices.
Unknown push type from installation {"deviceType":"win","deviceToken":"winToken"}
..FFFFFFFFFFFFFFFFFFFFFFFFFFF.undefined
...ParseError {
code: 202,
message: 'Account already exists for this username' }
FFFFFFFF.......FFFFF..FF..............FF....F..FFFF......F/home/jim/parse-server/src/index.js:9
__cov_GMmZWb5WdaFReMnaqh0ilw.s['1']++;require('babel-polyfill');__cov_GMmZWb5WdaFReMnaqh0ilw.s['2']++;var _cache=require('./cache');__cov_GMmZWb5WdaFReMnaqh0ilw.s['3']++;var _cache2=_interopRequireDefault(_cache);__cov_GMmZWb5WdaFReMnaqh0ilw.s['4']++;var _PromiseRouter=require('./PromiseRouter');__cov_GMmZWb5WdaFReMnaqh0ilw.s['5']++;var _PromiseRouter2=_interopRequireDefault(_PromiseRouter);__cov_GMmZWb5WdaFReMnaqh0ilw.s['6']++;var _GridStoreAdapter=require('./Adapters/Files/GridStoreAdapter');__cov_GMmZWb5WdaFReMnaqh0ilw.s['7']++;var _S3Adapter=require('./Adapters/Files/S3Adapter');__cov_GMmZWb5WdaFReMnaqh0ilw.s['8']++;var _FilesController=require('./Controllers/FilesController');__cov_GMmZWb5WdaFReMnaqh0ilw.s['9']++;var _ParsePushAdapter=require('./Adapters/Push/ParsePushAdapter');__cov_GMmZWb5WdaFReMnaqh0ilw.s['10']++;var _ParsePushAdapter2=_interopRequireDefault(_ParsePushAdapter);__cov_GMmZWb5WdaFReMnaqh0ilw.s['11']++;var _PushController=require('./Controllers/Push

TypeError: Cannot read property 'latitude' of undefined
at ParsePromise.query.find.success (/home/jim/parse-server/spec/ParseGeoPoint.spec.js:20:29)
at ParsePromise. (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:282:27)
at ParsePromise.wrappedResolvedCallback (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:139:41)
at ParsePromise.resolve (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:72:36)
at ParsePromise.wrappedResolvedCallback (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:149:27)
at ParsePromise.resolve (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:72:36)
at ParsePromise.wrappedResolvedCallback (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:149:27)
at ParsePromise.resolve (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:72:36)
at ParsePromise. (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:144:29)
at ParsePromise.wrappedResolvedCallback (/home/jim/parse-server/node_modules/parse/lib/node/ParsePromise.js:139:41)
npm ERR! Test failed. See above for more details.

@facebook-github-bot
Copy link

@sdf611097 updated the pull request.

@facebook-github-bot
Copy link

@sdf611097 updated the pull request.

@sdf611097
Copy link
Contributor Author

I'm sorry for test failed again and again, but I have no idea why failed in ParseGeoPoint.spec.js:93:7.
I run the test in another environment, and no failure on ParseGeoPoint.spec.js.

coverage not measured fully. <= Does this cause by non up-to-date base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants