Permalink
Browse files

Added async passthrough test

  • Loading branch information...
1 parent 458cb87 commit 78a4c18a05f6c64cb29f3305a72fe36491b4cdb0 @davglass committed Jan 7, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 src/jsonp/tests/unit/assets/jsonp-tests.js
@@ -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"));
+
}
}));

0 comments on commit 78a4c18

Please sign in to comment.