Skip to content

Commit

Permalink
Bump grunt-mocha to 1.0.2 (+ phantomjs2 subdep) (getsentry#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar authored and denstepa committed Jan 5, 2017
1 parent d683fe8 commit fe00286
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"grunt-contrib-uglify": "^0.11.0",
"grunt-eslint": "^17.3.1",
"grunt-gitinfo": "^0.1.7",
"grunt-mocha": "^0.4.15",
"grunt-mocha": "1.0.2",
"grunt-release": "^0.13.0",
"grunt-s3": "0.2.0-alpha.3",
"grunt-sri": "mattrobenolt/grunt-sri#pretty",
Expand Down
28 changes: 10 additions & 18 deletions test/integration/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,30 +414,22 @@ describe('integration', function () {
);
});

it('should NOT capture breadcrumbs from XMLHttpRequests to the Sentry store endpoint', function (done) {
it('should NOT denote XMLHttpRequests to the Sentry store endpoint as requiring breadcrumb capture', function (done) {
var iframe = this.iframe;
iframeExecute(iframe, done,
function () {
// some browsers trigger onpopstate for load / reset breadcrumb state
Raven._breadcrumbs = [];

var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://example.com/api/1/store/?sentry_key=public');
xhr.setRequestHeader('Content-type', 'application/json');
xhr.onreadystatechange = function () {
// don't fire `done` handler until at least *one* onreadystatechange
// has occurred (doesn't actually need to finish)
if (xhr.readyState === 4) {
setTimeout(done);
}
};
xhr.send();
xhr.open('GET', 'http://example.com/api/1/store/?sentry_key=public');

// can't actually transmit an XHR (breadcrumb isnt recorded until
// onreadystatechange fires), so enough to just verify that
// __raven_xhr wasn't set on xhr object

window.ravenData = xhr.hasOwnProperty('__raven_xhr');
setTimeout(done);
},
function () {
var Raven = iframe.contentWindow.Raven,
breadcrumbs = Raven._breadcrumbs;

assert.equal(breadcrumbs.length, 0);
assert.isFalse(iframe.contentWindow.ravenData);
}
);
});
Expand Down

0 comments on commit fe00286

Please sign in to comment.