node/test/wpt/test-hr-time.js
James M Snell f0bf373176
perf_hooks: make performance a global
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>
2021-04-01 13:14:10 -07:00

16 lines
347 B
JavaScript

'use strict';
require('../common');
const { WPTRunner } = require('../common/wpt');
const runner = new WPTRunner('hr-time');
runner.setInitScript(`
const { Blob } = require('buffer');
global.Blob = Blob;
const { PerformanceObserver } = require('perf_hooks');
global.PerformanceObserver = PerformanceObserver;
`);
runner.runJsTests();