Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
devcorpio committed Dec 22, 2023
1 parent df7423d commit 38f3a14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class TransactionService {
if (__DEV__) {
this._logger.debug(`startTransaction(${tr.id}, ${tr.name}, ${tr.type})`)
}
this._config.dispatchEvent(TRANSACTION_START, [tr])
this._config.events.send(TRANSACTION_START, [tr])
}

return tr
Expand Down Expand Up @@ -340,7 +340,7 @@ class TransactionService {
const configContext = this._config.get('context')
addTransactionContext(tr, configContext)

this._config.dispatchEvent(TRANSACTION_END, [tr])
this._config.events.send(TRANSACTION_END, [tr])
if (__DEV__) {
this._logger.debug(
`end transaction(${tr.id}, ${tr.name}, ${tr.type})`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('PerformanceMonitoring', function () {

it('should initialize and notify the transaction has been added to the queue', async () => {
performanceMonitoring.init()
spyOn(configService, 'dispatchEvent')
spyOn(configService, 'dispatchEvent').and.callThrough()

const tr = performanceMonitoring._transactionService.startTransaction(
'transaction',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('TransactionService', function () {
spyOn(logger, 'debug')

config = new Config()
spyOn(config, 'dispatchEvent')
spyOn(config, 'dispatchEvent').and.callThrough()
transactionService = new TransactionService(logger, config)
})

Expand Down

0 comments on commit 38f3a14

Please sign in to comment.