• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2/* eslint-disable no-global-assign */
3
4require('../common');
5
6const perf_hooks = require('perf_hooks');
7const {
8  strictEqual
9} = require('assert');
10
11const perf = performance;
12strictEqual(globalThis.performance, perf_hooks.performance);
13performance = undefined;
14strictEqual(globalThis.performance, undefined);
15strictEqual(typeof perf_hooks.performance.now, 'function');
16
17// Restore the value of performance for the known globals check
18performance = perf;
19