node/test/parallel/test-performance-global.js
Antoine du Hamel 634dc26605
test: ensure assertions are reached on all tests
PR-URL: https://github.com/nodejs/node/pull/60845
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-27 09:35:25 +00:00

16 lines
479 B
JavaScript

'use strict';
/* eslint-disable no-global-assign */
require('../common');
const perf_hooks = require('perf_hooks');
const assert = require('assert');
const perf = performance;
assert.strictEqual(globalThis.performance, perf_hooks.performance);
performance = undefined;
assert.strictEqual(globalThis.performance, undefined);
assert.strictEqual(typeof perf_hooks.performance.now, 'function');
// Restore the value of performance for the known globals check
performance = perf;