Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump grunt-mocha to 1.0.2 (+ phantomjs2 subdep) #777

Merged
merged 2 commits into from
Nov 22, 2016
Merged

Conversation

benvinegar
Copy link
Contributor

@benvinegar benvinegar commented Nov 18, 2016

I was struggling to get tests running since I've upgraded to Phantom 2 for Sentry acceptance tests. Rather than figure things out, I've decided to blindly upgrade raven-js's deps to also use Phantom2.

cc @mattrobenolt @MaxBittker @LewisJEllis

@@ -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) {
Copy link
Contributor Author

@benvinegar benvinegar Nov 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to change this test because Phantom 2 throws a network error that DOES get collected as a (error) breadcrumb. Better that this test not attempt to make an XHR at all.

Copy link
Contributor

@LewisJEllis LewisJEllis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small things but nbd if you want to merge as is.

// onreadystatechange fires), so enough to just verify that
// __raven_xhr wasn't set on xhr object

window.ravenData = '__raven_xhr' in xhr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasOwnProperty a bit safer here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is 99.9999% unlikely to happen since we are controlling the environment, but sure.

breadcrumbs = Raven._breadcrumbs;

assert.equal(breadcrumbs.length, 0);
assert.equal(iframe.contentWindow.ravenData, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use assert.isFalse here? Or at least strictEqual...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is better.

@benvinegar benvinegar merged commit 9a58ae0 into master Nov 22, 2016
@benvinegar benvinegar deleted the bump-grunt-mocha branch November 22, 2016 23:46
denstepa pushed a commit to denstepa/raven-js that referenced this pull request Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants