Skip to content

Commit

Permalink
Fix badly written Xhr test
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Vializ committed Mar 4, 2017
1 parent b594a93 commit 73d815c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/functional/test-xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,13 @@ describe('XHR', function() {
it('should be cloneable and each instance should provide text', () => {
const response = new FetchResponse(mockXhr);
const clone = response.clone();
return response.text()
.then(result => {
const callCloneText = () => clone.text().then(clonedText => {
expect(clonedText).to.equal(TEST_TEXT);
});
expect(callCloneText, 'should not throw').to.not.throw(Error);
expect(result).to.equal(TEST_TEXT);
});
return Promise.all([
response.text(),
clone.text(),
]).then(results => {
expect(results[0]).to.equal(TEST_TEXT);
expect(results[1]).to.equal(TEST_TEXT);
});
});

it('should not be cloneable if body is already accessed', () => {
Expand Down

0 comments on commit 73d815c

Please sign in to comment.