avoscloud-sdk
Advanced tools
Comparing version 0.6.8 to 0.6.9
{ | ||
"name": "leancloud-jssdk.js", | ||
"version": "0.6.8", | ||
"version": "0.6.9", | ||
"homepage": "https://github.com/leancloud/javascript-sdk", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -0,1 +1,4 @@ | ||
# 0.6.9 日期:2016 年 2 月 16 日 | ||
* 修复了 `AV.User#fetch` 不会运行回调函数的 bug。 | ||
#0.6.8 日期:2016 年 2 月 1 日 | ||
@@ -2,0 +5,0 @@ * 修复了云引擎中文件上传到 AWS 的问题。 |
@@ -462,3 +462,11 @@ 'use strict'; | ||
*/ | ||
fetch: function(fetchOptions, options) { | ||
fetch: function () { | ||
var options = null; | ||
var fetchOptions = {}; | ||
if (arguments.length === 1) { | ||
options = arguments[0]; | ||
} else if (arguments.length === 2) { | ||
fetchOptions = arguments[0]; | ||
options = arguments[1]; | ||
} | ||
var newOptions = options ? _.clone(options) : {}; | ||
@@ -465,0 +473,0 @@ newOptions.success = function(model) { |
'use strict'; | ||
module.exports = "js0.6.8"; | ||
module.exports = "js0.6.9"; |
{ | ||
"name": "avoscloud-sdk", | ||
"version": "0.6.8", | ||
"version": "0.6.9", | ||
"main": "./lib/av.js", | ||
@@ -5,0 +5,0 @@ "description": "AVOSCloud JavaScript SDK.", |
@@ -70,2 +70,21 @@ var username="u" + Date.now(); | ||
describe("fetch User", function () { | ||
it("should resolve promise", function (done) { | ||
var currentUser = AV.User.current(); | ||
currentUser.fetch().then(function (user) { | ||
expect(user).to.be.ok(); | ||
done(); | ||
}); | ||
}); | ||
it("should run callback", function (done) { | ||
var currentUser = AV.User.current(); | ||
currentUser.fetch({ | ||
success: function (user) { | ||
expect(user).to.be.ok(); | ||
done(); | ||
} | ||
}) | ||
});; | ||
}); | ||
describe("User update",function(){ | ||
@@ -72,0 +91,0 @@ it("shoud update name",function(done){ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1301172
11
30918