-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raven.uninstall also restores builtin methods
- Loading branch information
1 parent
03e8fc1
commit 944323c
Showing
4 changed files
with
132 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,14 +36,25 @@ | |
}; | ||
}()); | ||
</script> | ||
<script src="../../node_modules/jquery/dist/jquery.js"></script> | ||
<script src="../../build/raven.js"></script> | ||
<script> | ||
// stub _makeRequest so we don't actually transmit any data | ||
Raven._makeRequest = function () {}; | ||
|
||
// get a reference to the original, unwrapped setTimeout (used for | ||
// making "clean" stack traces that don't originate from mocha) | ||
window.origSetTimeout = setTimeout; | ||
// store references to original, unwrapped built-ins in order to: | ||
// - get a clean, unwrapped setTimeout (so stack traces don't include | ||
// frames from mocha) | ||
// - make assertions re: wrapped functions | ||
|
||
window.originalBuiltIns = { | ||
setTimeout: setTimeout, | ||
setInterval: setInterval, | ||
requestAnimationFrame: requestAnimationFrame, | ||
xhrProtoOpen: XMLHttpRequest.prototype.open, | ||
headAddEventListener: document.head.addEventListener, // use <head> 'cause body isn't closed yet | ||
headRemoveEventListener: document.head.removeEventListener | ||
}; | ||
|
||
window.ravenData = []; | ||
Raven.config('https://[email protected]/1', { | ||
|
@@ -62,3 +73,5 @@ | |
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters