mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37970 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
19 lines
469 B
JavaScript
19 lines
469 B
JavaScript
'use strict';
|
|
/* eslint-disable no-global-assign */
|
|
|
|
require('../common');
|
|
|
|
const perf_hooks = require('perf_hooks');
|
|
const {
|
|
strictEqual
|
|
} = require('assert');
|
|
|
|
const perf = performance;
|
|
strictEqual(globalThis.performance, perf_hooks.performance);
|
|
performance = undefined;
|
|
strictEqual(globalThis.performance, undefined);
|
|
strictEqual(typeof perf_hooks.performance.now, 'function');
|
|
|
|
// Restore the value of performance for the known globals check
|
|
performance = perf;
|