Skip to content

Commit

Permalink
remove process.platform mock
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsinclair authored and zbjornson committed Jul 31, 2021
1 parent 4c8bbc7 commit 9d5b7f8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/defaultMetricsTest.js
Expand Up @@ -4,17 +4,11 @@ describe('collectDefaultMetrics', () => {
const register = require('../index').register;
const Registry = require('../index').Registry;
const collectDefaultMetrics = require('../index').collectDefaultMetrics;
let platform;
let cpuUsage;

beforeAll(() => {
platform = process.platform;
cpuUsage = process.cpuUsage;

Object.defineProperty(process, 'platform', {
value: 'my-bogus-platform',
});

if (cpuUsage) {
Object.defineProperty(process, 'cpuUsage', {
value() {
Expand All @@ -31,10 +25,6 @@ describe('collectDefaultMetrics', () => {
});

afterAll(() => {
Object.defineProperty(process, 'platform', {
value: platform,
});

if (cpuUsage) {
Object.defineProperty(process, 'cpuUsage', {
value: cpuUsage,
Expand Down

0 comments on commit 9d5b7f8

Please sign in to comment.