Skip to content

Commit

Permalink
feat: updated fake agent to register ritm hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 committed Aug 9, 2023
1 parent 0342e4d commit e4f4074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ TestAgent.makeFullyInstrumented = function makeInstrumented(conf, setState) {
*/
TestAgent.prototype.instrument = function instrument(instrumentFull = false) {
shimmer.debug = true
shimmer.patchModule(this.agent)
if (instrumentFull) {
shimmer.bootstrapInstrumentation(this.agent)
} else {
shimmer.registerCoreInstrumentation(this.agent)
}
shimmer.registerHooks(this.agent)

return this
}
Expand All @@ -153,7 +153,7 @@ TestAgent.prototype.instrument = function instrument(instrumentFull = false) {
* that tests aren't stepping on eachothers' toes.
*/
TestAgent.prototype.unload = function unload() {
shimmer.unpatchModule()
shimmer.removeHooks()
shimmer.unwrapAll()
shimmer.debug = false
shimmer.registeredInstrumentations = Object.create(null)
Expand Down

0 comments on commit e4f4074

Please sign in to comment.