Skip to content

Commit

Permalink
Added async passthrough test
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Jan 7, 2013
1 parent 458cb87 commit 78a4c18
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/jsonp/tests/unit/assets/jsonp-tests.js
Expand Up @@ -105,6 +105,27 @@ suite.add(new Y.Test.Case({
// to allow JSONP the chance to clean up the callback registry before
// other tests begin.
test.wait();
},
"async config should be set via Y.Get.script": function () {
var test = this,
scripts = Y.all('script')._nodes,
newScript;

Y.jsonp("echo/jsonp?callback={callback}", {
on: {
success: function () {

}
},
async: true
});

newScript = Y.Array.filter(Y.all('script')._nodes, function (s) {
return Y.Array.indexOf(scripts, s) === -1;
})[0];

Y.Assert.isTrue(Y.one(newScript).get("async"));

}
}));

Expand Down

0 comments on commit 78a4c18

Please sign in to comment.