mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
chore: deprecate node compat itests (#25573)
This commit is contained in:
parent
e4ea9be874
commit
eb8ee95f08
17 changed files with 56 additions and 63 deletions
|
@ -41,8 +41,6 @@ mod jupyter;
|
|||
mod lint;
|
||||
#[path = "lsp_tests.rs"]
|
||||
mod lsp;
|
||||
#[path = "node_compat_tests.rs"]
|
||||
mod node_compat_tests;
|
||||
#[path = "node_unit_tests.rs"]
|
||||
mod node_unit_tests;
|
||||
#[path = "npm_tests.rs"]
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
use test_util as util;
|
||||
use test_util::itest;
|
||||
use util::env_vars_for_npm_tests;
|
||||
|
||||
itest!(node_test_module {
|
||||
args: "test node/test.js",
|
||||
output: "node/test.out",
|
||||
envs: env_vars_for_npm_tests(),
|
||||
exit_code: 1,
|
||||
http_server: true,
|
||||
});
|
||||
|
||||
itest!(node_test_module_no_sanitizers {
|
||||
args: "test -A --no-check node/test_no_sanitizers/test.js",
|
||||
output: "node/test_no_sanitizers/test.out",
|
||||
envs: env_vars_for_npm_tests(),
|
||||
exit_code: 0,
|
||||
// TODO(mmastrac): fix exit sanitizer part of test
|
||||
// exit_code: 123,
|
||||
http_server: true,
|
||||
});
|
||||
|
||||
itest!(
|
||||
node_process_beforeexit_exit_events_emitted_without_listeners {
|
||||
args: "run node/process_beforeexit_exit_events.ts",
|
||||
output: "node/process_beforeexit_exit_events.out",
|
||||
exit_code: 0,
|
||||
}
|
||||
);
|
||||
|
||||
itest!(web_node_events_dispatched_in_correct_order {
|
||||
args: "run node/events_order.ts",
|
||||
output: "node/events_order.out",
|
||||
exit_code: 0,
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"args": "run process_beforeexit_exit_events.ts",
|
||||
"output": "process_beforeexit_exit_events.out",
|
||||
"exitCode": 0
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"args": "test test.js",
|
||||
"output": "test.out",
|
||||
"envs": {
|
||||
"NO_COLOR": "1",
|
||||
"NPM_CONFIG_REGISTRY": "http://localhost:4260/"
|
||||
},
|
||||
"exitCode": 1
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
[WILDCARD]
|
||||
running 63 tests from ./node/test.js
|
||||
running 63 tests from ./test.js
|
||||
sync pass todo ...
|
||||
------- output -------
|
||||
Warning: Not implemented: test.TestContext.todo
|
||||
|
@ -57,7 +57,7 @@ async assertion fail ... FAILED [WILDCARD]
|
|||
resolve pass ... ok [WILDCARD]
|
||||
reject fail ... FAILED [WILDCARD]
|
||||
unhandled rejection - passes but warns ...
|
||||
Uncaught error from ./node/test.js FAILED
|
||||
Uncaught error from ./test.js FAILED
|
||||
unhandled rejection - passes but warns ... cancelled ([WILDCARD])
|
||||
async unhandled rejection - passes but warns ... cancelled ([WILDCARD])
|
||||
immediate throw - passes but warns ... cancelled ([WILDCARD])
|
||||
|
@ -108,32 +108,32 @@ unfinished test with unhandledRejection ... cancelled ([WILDCARD])
|
|||
|
||||
ERRORS
|
||||
|
||||
sync fail todo => ./node/test.js:20:1
|
||||
sync fail todo => ./test.js:20:1
|
||||
error: Error: thrown from sync fail todo
|
||||
throw new Error("thrown from sync fail todo");
|
||||
[WILDCARD]
|
||||
|
||||
sync fail todo with message => ./node/test.js:25:1
|
||||
sync fail todo with message => ./test.js:25:1
|
||||
error: Error: thrown from sync fail todo with message
|
||||
throw new Error("thrown from sync fail todo with message");
|
||||
[WILDCARD]
|
||||
|
||||
sync throw fail => ./node/test.js:42:1
|
||||
sync throw fail => ./test.js:42:1
|
||||
error: Error: thrown from sync throw fail
|
||||
throw new Error("thrown from sync throw fail");
|
||||
[WILDCARD]
|
||||
|
||||
async throw fail => ./node/test.js:53:1
|
||||
async throw fail => ./test.js:53:1
|
||||
error: Error: thrown from async throw fail
|
||||
throw new Error("thrown from async throw fail");
|
||||
[WILDCARD]
|
||||
|
||||
async skip fail => ./node/test.js:64:1
|
||||
async skip fail => ./test.js:64:1
|
||||
error: Error: thrown from async throw fail
|
||||
throw new Error("thrown from async throw fail");
|
||||
[WILDCARD]
|
||||
|
||||
async assertion fail => ./node/test.js:69:1
|
||||
async assertion fail => ./test.js:69:1
|
||||
error: AssertionError: Values are not strictly equal:
|
||||
|
||||
|
||||
|
@ -145,13 +145,13 @@ error: AssertionError: Values are not strictly equal:
|
|||
|
||||
at [WILDCARD]
|
||||
|
||||
reject fail => ./node/test.js:78:1
|
||||
reject fail => ./test.js:78:1
|
||||
error: Error: rejected from reject fail
|
||||
return Promise.reject(new Error("rejected from reject fail"));
|
||||
^
|
||||
at [WILDCARD]
|
||||
|
||||
./node/test.js (uncaught error)
|
||||
./test.js (uncaught error)
|
||||
error: (in promise) Error: rejected from unhandled rejection fail
|
||||
Promise.reject(new Error("rejected from unhandled rejection fail"));
|
||||
^
|
||||
|
@ -161,14 +161,14 @@ It most likely originated from a dangling promise, event/timeout handler or top-
|
|||
|
||||
FAILURES
|
||||
|
||||
sync fail todo => ./node/test.js:20:1
|
||||
sync fail todo with message => ./node/test.js:25:1
|
||||
sync throw fail => ./node/test.js:42:1
|
||||
async throw fail => ./node/test.js:53:1
|
||||
async skip fail => ./node/test.js:64:1
|
||||
async assertion fail => ./node/test.js:69:1
|
||||
reject fail => ./node/test.js:78:1
|
||||
./node/test.js (uncaught error)
|
||||
sync fail todo => ./test.js:20:1
|
||||
sync fail todo with message => ./test.js:25:1
|
||||
sync throw fail => ./test.js:42:1
|
||||
async throw fail => ./test.js:53:1
|
||||
async skip fail => ./test.js:64:1
|
||||
async assertion fail => ./test.js:69:1
|
||||
reject fail => ./test.js:78:1
|
||||
./test.js (uncaught error)
|
||||
|
||||
FAILED | 9 passed (2 steps) | 51 failed | 4 ignored [WILDCARD]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"args": "test -A --no-check test_no_sanitizers/test.js",
|
||||
"output": "test_no_sanitizers/test.out",
|
||||
"envs": {
|
||||
"NO_COLOR": "1",
|
||||
"NPM_CONFIG_REGISTRY": "http://localhost:4260/"
|
||||
},
|
||||
"exitCode": 0
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
const filename = Deno.args[0];
|
||||
using file = await Deno.open(filename);
|
||||
|
||||
await file.readable.pipeTo(Deno.stdout.writable);
|
|
@ -1,12 +1,11 @@
|
|||
import test from "node:test";
|
||||
|
||||
test("should not complain about resource and op sanitizers", async (t) => {
|
||||
// resource
|
||||
const _file1 = Deno.open("welcome.ts");
|
||||
const _file1 = Deno.open("test_no_sanitizers/welcome.ts");
|
||||
|
||||
await t.test("nested test", () => {
|
||||
// resource
|
||||
const _file2 = Deno.open("cat.ts");
|
||||
const _file2 = Deno.open("test_no_sanitizers/cat.ts");
|
||||
|
||||
// op
|
||||
crypto.subtle.digest(
|
|
@ -1,4 +1,4 @@
|
|||
running 1 test from ./node/test_no_sanitizers/test.js
|
||||
running 1 test from ./test_no_sanitizers/test.js
|
||||
should not complain about resource and op sanitizers ...
|
||||
nested test ... ok ([WILDCARD])
|
||||
should not complain about resource and op sanitizers ... ok ([WILDCARD])
|
|
@ -0,0 +1 @@
|
|||
console.log("Welcome to Deno!");
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"args": "run events_order.ts",
|
||||
"output": "events_order.out",
|
||||
"exitCode": 0
|
||||
}
|
|
@ -214,7 +214,7 @@ async function ensureNoNewITests() {
|
|||
"lint_tests.rs": 18,
|
||||
// Read the comment above. Please don't increase these numbers!
|
||||
"lsp_tests.rs": 0,
|
||||
"node_compat_tests.rs": 4,
|
||||
"node_compat_tests.rs": 0,
|
||||
"node_unit_tests.rs": 2,
|
||||
"npm_tests.rs": 92,
|
||||
"pm_tests.rs": 0,
|
||||
|
@ -227,7 +227,7 @@ async function ensureNoNewITests() {
|
|||
"upgrade_tests.rs": 0,
|
||||
"vendor_tests.rs": 1,
|
||||
"watcher_tests.rs": 0,
|
||||
"worker_tests.rs": 18,
|
||||
"worker_tests.rs": 0,
|
||||
};
|
||||
const integrationDir = join(ROOT_PATH, "tests", "integration");
|
||||
for await (const entry of Deno.readDir(integrationDir)) {
|
||||
|
|
Loading…
Reference in a new issue