mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 06:44:45 -05:00
fb24fd37c9
This PR enables node compat test cases found passing by using the tool added in #27122 The percentage of passing test case increases from 16.16% to 30.43% by this change.
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
// deno-fmt-ignore-file
|
|
// deno-lint-ignore-file
|
|
|
|
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
|
|
// Taken from Node 20.11.1
|
|
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
|
|
|
|
'use strict';
|
|
|
|
if (!process.features.inspector) return;
|
|
|
|
require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const tmpdir = require('../common/tmpdir');
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const { spawnSync } = require('child_process');
|
|
|
|
tmpdir.refresh();
|
|
|
|
// v8.takeCoverage() should be a noop if NODE_V8_COVERAGE is not set.
|
|
const intervals = 40;
|
|
{
|
|
const output = spawnSync(process.execPath, [
|
|
'-r',
|
|
fixtures.path('v8-coverage', 'take-coverage'),
|
|
fixtures.path('v8-coverage', 'interval'),
|
|
], {
|
|
env: {
|
|
...process.env,
|
|
NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER',
|
|
TEST_INTERVALS: intervals
|
|
},
|
|
});
|
|
console.log(output.stderr.toString());
|
|
assert.strictEqual(output.status, 0);
|
|
const coverageFiles = fs.readdirSync(tmpdir.path);
|
|
assert.strictEqual(coverageFiles.length, 0);
|
|
}
|