Skip to content

Commit 6bd795d

Browse files
committed
fixup!
1 parent 0c65c5f commit 6bd795d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/dd-trace/test/runtime_metrics.spec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ require('./setup/core')
1515

1616
const { DogStatsDClient } = require('../src/dogstatsd')
1717

18-
const isWindows = os.platform() === 'win32'
19-
2018
function createGarbage (count = 50) {
2119
let last = {}
2220
const obj = last
@@ -183,6 +181,13 @@ function createGarbage (count = 50) {
183181
throw new Error('Native metrics are not supported in this environment')
184182
},
185183
}
184+
} else {
185+
// The log is called in case native metrics fail to load.
186+
proxiedObject['../log'] = {
187+
error () {
188+
throw new Error('Native metrics should load properly')
189+
},
190+
}
186191
}
187192

188193
runtimeMetrics = proxyquire('../src/runtime_metrics/runtime_metrics', proxiedObject)

0 commit comments

Comments
 (0)