summaryrefslogtreecommitdiff
path: root/tests/unit_node
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-09-14 11:58:47 +0100
committerGitHub <noreply@github.com>2024-09-14 11:58:47 +0100
commitaf2d992ecd2b9320072164b6ee295c31a3194406 (patch)
tree0926e2852aa2c4eb300e1f54f4c84d7568589b3b /tests/unit_node
parent2c0bf6fd65b3276c4818c73028b19819608c8e70 (diff)
feat: TypeScript 5.6 and `npm:@types/node@22` (#25614)
Diffstat (limited to 'tests/unit_node')
-rw-r--r--tests/unit_node/_fs/_fs_stat_test.ts4
-rw-r--r--tests/unit_node/child_process_test.ts2
-rw-r--r--tests/unit_node/events_test.ts1
-rw-r--r--tests/unit_node/stream_test.ts1
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit_node/_fs/_fs_stat_test.ts b/tests/unit_node/_fs/_fs_stat_test.ts
index 09d78f9db..02c620e2d 100644
--- a/tests/unit_node/_fs/_fs_stat_test.ts
+++ b/tests/unit_node/_fs/_fs_stat_test.ts
@@ -133,7 +133,9 @@ Deno.test("[std/node/fs] stat callback isn't called twice if error is thrown", a
Deno.test({
name: "[std/node/fs] stat default methods",
fn() {
- const stats = new Stats();
+ // stats ctor is private
+ // deno-lint-ignore no-explicit-any
+ const stats = new (Stats as any)();
assertEquals(stats.isFile(), false);
assertEquals(stats.isDirectory(), false);
assertEquals(stats.isBlockDevice(), false);
diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts
index 7e6977740..f776fa4ac 100644
--- a/tests/unit_node/child_process_test.ts
+++ b/tests/unit_node/child_process_test.ts
@@ -12,7 +12,7 @@ import {
assertThrows,
} from "@std/assert";
import * as path from "@std/path";
-import { setTimeout } from "node:timers";
+import { clearTimeout, setTimeout } from "node:timers";
const { spawn, spawnSync, execFile, execFileSync, ChildProcess } = CP;
diff --git a/tests/unit_node/events_test.ts b/tests/unit_node/events_test.ts
index 82808d523..8cfef6319 100644
--- a/tests/unit_node/events_test.ts
+++ b/tests/unit_node/events_test.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-// @ts-expect-error: @types/node is outdated
import events, { addAbortListener, EventEmitter } from "node:events";
EventEmitter.captureRejections = true;
diff --git a/tests/unit_node/stream_test.ts b/tests/unit_node/stream_test.ts
index 0aa2de18c..b8542f6cf 100644
--- a/tests/unit_node/stream_test.ts
+++ b/tests/unit_node/stream_test.ts
@@ -3,7 +3,6 @@
import { assert, assertEquals } from "@std/assert";
import { fromFileUrl, relative } from "@std/path";
import { pipeline } from "node:stream/promises";
-// @ts-expect-error: @types/node is outdated
import { getDefaultHighWaterMark, Stream } from "node:stream";
import { createReadStream, createWriteStream } from "node:fs";
import { EventEmitter } from "node:events";