Skip to content

Commit

Permalink
Add XHR Sync test
Browse files Browse the repository at this point in the history
  • Loading branch information
morsdyce committed Mar 3, 2017
1 parent 8c95b89 commit 16a7c41
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/tests.js
Expand Up @@ -156,6 +156,17 @@ describe('xhook', function() {
expect((/\{\s*\[native code\]\s*\}/).test(window.fetch.toString())).to.equal(false);
});

it('sync XHR should not fail', function(done) {
var xhr = new XMLHttpRequest();
xhr.open('GET', '../example/example1.txt', false);
xhr.onload = function() {
expect(xhr.responseText).to.contain('the first text file');
done();
};

xhr.send();
});

});


Expand Down

0 comments on commit 16a7c41

Please sign in to comment.