Skip to content

Instantly share code, notes, and snippets.

@giuscri
Created November 27, 2014 09:20
Show Gist options
  • Save giuscri/c18a30797162214b7ba2 to your computer and use it in GitHub Desktop.
Save giuscri/c18a30797162214b7ba2 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="bower_components/qunit/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="application/javascript" src="bower_components/qunit/qunit/qunit.js"></script>
<script type="application/javascript">
QUnit.asyncTest("Testing plain ajax", function (assert) {
expect(1);
var xhr = new XMLHttpRequest();
xhr.open('GET', '/index.html', true);
xhr.onload = function () {
assert.ok(xhr.responseText, "AJAX did run");
QUnit.start();
};
xhr.send();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment