Skip to content

Commit 9d5b7f8

Browse files
jamsinclairzbjornson
authored andcommitted
remove process.platform mock
1 parent 4c8bbc7 commit 9d5b7f8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

test/defaultMetricsTest.js

-10
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@ describe('collectDefaultMetrics', () => {
44
const register = require('../index').register;
55
const Registry = require('../index').Registry;
66
const collectDefaultMetrics = require('../index').collectDefaultMetrics;
7-
let platform;
87
let cpuUsage;
98

109
beforeAll(() => {
11-
platform = process.platform;
1210
cpuUsage = process.cpuUsage;
1311

14-
Object.defineProperty(process, 'platform', {
15-
value: 'my-bogus-platform',
16-
});
17-
1812
if (cpuUsage) {
1913
Object.defineProperty(process, 'cpuUsage', {
2014
value() {
@@ -31,10 +25,6 @@ describe('collectDefaultMetrics', () => {
3125
});
3226

3327
afterAll(() => {
34-
Object.defineProperty(process, 'platform', {
35-
value: platform,
36-
});
37-
3828
if (cpuUsage) {
3929
Object.defineProperty(process, 'cpuUsage', {
4030
value: cpuUsage,

0 commit comments

Comments
 (0)