mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
chore: disable flaky Node compat tests (#18760)
I'm not able to reproduce any of the failures from CI on my machine. I'm going to disable these tests for now as they are holding us back.
This commit is contained in:
parent
b7e19134b8
commit
edca01c35e
4 changed files with 8 additions and 101 deletions
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
import { partition } from "../../../test_util/std/collections/partition.ts";
|
||||
import { join } from "../../../test_util/std/path/mod.ts";
|
||||
|
||||
import * as JSONC from "../../../test_util/std/encoding/jsonc.ts";
|
||||
/**
|
||||
* The test suite matches the folders inside the `test` folder inside the
|
||||
* node repo
|
||||
|
@ -26,9 +26,9 @@ interface Config {
|
|||
darwinIgnore: TestSuites;
|
||||
}
|
||||
|
||||
export const config: Config = JSON.parse(
|
||||
await Deno.readTextFile(new URL("./config.json", import.meta.url)),
|
||||
);
|
||||
export const config: Config = JSONC.parse(
|
||||
await Deno.readTextFile(new URL("./config.jsonc", import.meta.url)),
|
||||
) as unknown as Config;
|
||||
|
||||
export const ignoreList = Object.entries(config.ignore).reduce(
|
||||
(total: RegExp[], [suite, paths]) => {
|
||||
|
|
|
@ -198,7 +198,8 @@
|
|||
"test-buffer-zero-fill-cli.js",
|
||||
"test-buffer-zero-fill-reset.js",
|
||||
"test-buffer-zero-fill.js",
|
||||
"test-child-process-can-write-to-stdout.js",
|
||||
// TODO(bartlomieju): this test was flaky on macOS CI
|
||||
// "test-child-process-can-write-to-stdout.js",
|
||||
"test-child-process-default-options.js",
|
||||
"test-child-process-double-pipe.js",
|
||||
"test-child-process-exec-abortcontroller-promisified.js",
|
||||
|
@ -210,7 +211,8 @@
|
|||
"test-child-process-exec-stdout-stderr-data-string.js",
|
||||
"test-child-process-exec-timeout-expire.js",
|
||||
"test-child-process-exec-timeout-kill.js",
|
||||
"test-child-process-execFile-promisified-abortController.js",
|
||||
// TODO(bartlomieju): this test was flaky on macOS CI
|
||||
// "test-child-process-execFile-promisified-abortController.js",
|
||||
"test-child-process-execfile-maxbuf.js",
|
||||
"test-child-process-execfilesync-maxbuf.js",
|
||||
"test-child-process-execsync-maxbuf.js",
|
|
@ -1,29 +0,0 @@
|
|||
// deno-fmt-ignore-file
|
||||
// deno-lint-ignore-file
|
||||
|
||||
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
|
||||
// Taken from Node 18.12.1
|
||||
// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually
|
||||
|
||||
'use strict';
|
||||
// Tests that a spawned child process can write to stdout without throwing.
|
||||
// See https://github.com/nodejs/node-v0.x-archive/issues/1899.
|
||||
|
||||
require('../common');
|
||||
const fixtures = require('../common/fixtures');
|
||||
const assert = require('assert');
|
||||
const spawn = require('child_process').spawn;
|
||||
|
||||
const child = spawn(process.argv[0], [
|
||||
fixtures.path('GH-1899-output.js'),
|
||||
]);
|
||||
let output = '';
|
||||
|
||||
child.stdout.on('data', function(data) {
|
||||
output += data;
|
||||
});
|
||||
|
||||
child.on('exit', function(code, signal) {
|
||||
assert.strictEqual(code, 0);
|
||||
assert.strictEqual(output, 'hello, world!\n');
|
||||
});
|
|
@ -1,66 +0,0 @@
|
|||
// deno-fmt-ignore-file
|
||||
// deno-lint-ignore-file
|
||||
|
||||
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
|
||||
// Taken from Node 18.12.1
|
||||
// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually
|
||||
|
||||
// TODO(PolarETech): The args passed to promisified() should not need to
|
||||
// include "require.ts".
|
||||
|
||||
'use strict';
|
||||
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { promisify } = require('util');
|
||||
const execFile = require('child_process').execFile;
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
const echoFixture = fixtures.path('echo.js');
|
||||
const promisified = promisify(execFile);
|
||||
const invalidArgTypeError = {
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
name: 'TypeError'
|
||||
};
|
||||
|
||||
{
|
||||
// Verify that the signal option works properly
|
||||
const ac = new AbortController();
|
||||
const signal = ac.signal;
|
||||
const promise = promisified(process.execPath, ['require.ts', echoFixture, 0], { signal });
|
||||
|
||||
ac.abort();
|
||||
|
||||
assert.rejects(
|
||||
promise,
|
||||
{ name: 'AbortError' }
|
||||
).then(common.mustCall());
|
||||
}
|
||||
|
||||
{
|
||||
// Verify that the signal option works properly when already aborted
|
||||
const signal = AbortSignal.abort();
|
||||
|
||||
assert.rejects(
|
||||
promisified(process.execPath, ['require.ts', echoFixture, 0], { signal }),
|
||||
{ name: 'AbortError' }
|
||||
).then(common.mustCall());
|
||||
}
|
||||
|
||||
{
|
||||
// Verify that if something different than Abortcontroller.signal
|
||||
// is passed, ERR_INVALID_ARG_TYPE is thrown
|
||||
const signal = {};
|
||||
assert.throws(() => {
|
||||
promisified(process.execPath, ['require.ts', echoFixture, 0], { signal });
|
||||
}, invalidArgTypeError);
|
||||
}
|
||||
|
||||
{
|
||||
// Verify that if something different than Abortcontroller.signal
|
||||
// is passed, ERR_INVALID_ARG_TYPE is thrown
|
||||
const signal = 'world!';
|
||||
assert.throws(() => {
|
||||
promisified(process.execPath, ['require.ts', echoFixture, 0], { signal });
|
||||
}, invalidArgTypeError);
|
||||
}
|
Loading…
Add table
Reference in a new issue