refactor: update image source documentation snippets and tests (#5390)

This commit is contained in:
Nick Iliev
2018-02-07 14:58:28 +02:00
committed by GitHub
parent 85dc75e09a
commit 7121eaea89
4 changed files with 71 additions and 53 deletions

View File

@@ -164,8 +164,8 @@ export var test_getImage = function (done) {
var result;
// >> http-get-image
http.getImage("https://httpbin.org/image/png").then(function (r) {
//// Argument (r) is Image!
http.getImage("https://httpbin.org/image/png").then((r) => {
// Argument (r) is ImageSource!
// >> (hide)
result = r;
try {
@@ -176,10 +176,10 @@ export var test_getImage = function (done) {
done(err);
}
// << (hide)
}, function (e) {
//// Argument (e) is Error!
}, (err) => {
// Argument (e) is Error!
// >> (hide)
done(e);
done(err);
// << (hide)
});
// << http-get-image