Skip to content

Commit 9a58ae0

Browse files
authored
Bump grunt-mocha to 1.0.2 (+ phantomjs2 subdep) (#777)
1 parent d0077c1 commit 9a58ae0

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"grunt-contrib-uglify": "^0.11.0",
3535
"grunt-eslint": "^17.3.1",
3636
"grunt-gitinfo": "^0.1.7",
37-
"grunt-mocha": "^0.4.15",
37+
"grunt-mocha": "1.0.2",
3838
"grunt-release": "^0.13.0",
3939
"grunt-s3": "0.2.0-alpha.3",
4040
"grunt-sri": "mattrobenolt/grunt-sri#pretty",

test/integration/test.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -414,30 +414,22 @@ describe('integration', function () {
414414
);
415415
});
416416

417-
it('should NOT capture breadcrumbs from XMLHttpRequests to the Sentry store endpoint', function (done) {
417+
it('should NOT denote XMLHttpRequests to the Sentry store endpoint as requiring breadcrumb capture', function (done) {
418418
var iframe = this.iframe;
419419
iframeExecute(iframe, done,
420420
function () {
421-
// some browsers trigger onpopstate for load / reset breadcrumb state
422-
Raven._breadcrumbs = [];
423-
424421
var xhr = new XMLHttpRequest();
425-
xhr.open('GET', 'https://example.com/api/1/store/?sentry_key=public');
426-
xhr.setRequestHeader('Content-type', 'application/json');
427-
xhr.onreadystatechange = function () {
428-
// don't fire `done` handler until at least *one* onreadystatechange
429-
// has occurred (doesn't actually need to finish)
430-
if (xhr.readyState === 4) {
431-
setTimeout(done);
432-
}
433-
};
434-
xhr.send();
422+
xhr.open('GET', 'http://example.com/api/1/store/?sentry_key=public');
423+
424+
// can't actually transmit an XHR (breadcrumb isnt recorded until
425+
// onreadystatechange fires), so enough to just verify that
426+
// __raven_xhr wasn't set on xhr object
427+
428+
window.ravenData = xhr.hasOwnProperty('__raven_xhr');
429+
setTimeout(done);
435430
},
436431
function () {
437-
var Raven = iframe.contentWindow.Raven,
438-
breadcrumbs = Raven._breadcrumbs;
439-
440-
assert.equal(breadcrumbs.length, 0);
432+
assert.isFalse(iframe.contentWindow.ravenData);
441433
}
442434
);
443435
});

0 commit comments

Comments
 (0)