diff --git a/packages/dev-server-legacy/package.json b/packages/dev-server-legacy/package.json
index 40f78b2c9b..8204aa820c 100644
--- a/packages/dev-server-legacy/package.json
+++ b/packages/dev-server-legacy/package.json
@@ -27,8 +27,8 @@
   "scripts": {
     "build": "tsc",
     "start": "wds --open --config demo/server.config.mjs",
-    "test:node": "mocha \"test/**/*.test.ts\" --require ts-node/register --reporter dot",
-    "test:watch": "mocha \"test/**/*.test.ts\" --require ts-node/register --watch --watch-files src,test"
+    "test:node": "node --experimental-strip-types --test --test-force-exit \"test/**/*.test.ts\"",
+    "test:watch": "node --experimental-strip-types --test --test-force-exit --watch \"test/**/*.test.ts\""
   },
   "files": [
     "*.d.ts",
diff --git a/packages/dev-server-legacy/test/transform-html.test.ts b/packages/dev-server-legacy/test/transform-html.test.ts
index 2fdd199512..8f3e68c367 100644
--- a/packages/dev-server-legacy/test/transform-html.test.ts
+++ b/packages/dev-server-legacy/test/transform-html.test.ts
@@ -1,9 +1,11 @@
-import { expect } from 'chai';
+import { describe, it } from 'node:test';
+import assert from 'node:assert/strict';
 import { createTestServer } from '@web/dev-server-core/test-helpers';
 import { fetchText, expectIncludes } from '@web/dev-server-core/test-helpers';
 
-import { legacyPlugin } from '../src/legacyPlugin.js';
-import { modernUserAgents, legacyUserAgents } from './userAgents.js';
+// rewrite to ../src/legacyPlugin.ts when TS 5.7+ / rewriteRelativeImportExtensions
+import { legacyPlugin } from '../dist/legacyPlugin.js';
+import { modernUserAgents, legacyUserAgents } from './userAgents.ts';
 
 const htmlBody = `
 <html>
@@ -25,12 +27,10 @@ const inlineScriptHtmlBody = `
 </body>
 </html>`;
 
-describe('legacyPlugin - transform html', function () {
-  this.timeout(10000);
-
+describe('legacyPlugin - transform html', { timeout: 10000 }, () => {
   it(`does not do any work on a modern browser`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
@@ -48,13 +48,13 @@ describe('legacyPlugin - transform html', function () {
       headers: { 'user-agent': modernUserAgents['Chrome 78'] },
     });
 
-    expect(text.trim()).to.equal(htmlBody.trim());
+    assert.equal(text.trim(), htmlBody.trim());
     server.stop();
   });
 
   it(`injects polyfills into the HTML page on legacy browsers`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
@@ -80,7 +80,7 @@ describe('legacyPlugin - transform html', function () {
 
   it(`injects systemjs param to inline modules`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
@@ -104,7 +104,7 @@ describe('legacyPlugin - transform html', function () {
 
   it(`handles inline scripts`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
@@ -131,7 +131,7 @@ describe('legacyPlugin - transform html', function () {
 
   it(`can request inline scripts`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
@@ -158,7 +158,7 @@ describe('legacyPlugin - transform html', function () {
 
   it(`includes url parameters in inline script key`, async () => {
     const { server, host } = await createTestServer({
-      rootDir: __dirname,
+      rootDir: import.meta.dirname,
       plugins: [
         {
           name: 'test',
diff --git a/packages/dev-server-legacy/test/transform-js.test.ts b/packages/dev-server-legacy/test/transform-js.test.ts
index fd035680eb..31c6e8ed9c 100644
--- a/packages/dev-server-legacy/test/transform-js.test.ts
+++ b/packages/dev-server-legacy/test/transform-js.test.ts
@@ -1,9 +1,11 @@
-import { expect } from 'chai';
+import { describe, it } from 'node:test';
+import assert from 'node:assert/strict';
 import { createTestServer } from '@web/dev-server-core/test-helpers';
 import { fetchText, expectIncludes, expectNotIncludes } from '@web/dev-server-core/test-helpers';
 
-import { legacyPlugin } from '../src/legacyPlugin.js';
-import { modernUserAgents, legacyUserAgents } from './userAgents.js';
+// rewrite to ../src/legacyPlugin.ts when TS 5.7+ / rewriteRelativeImportExtensions
+import { legacyPlugin } from '../dist/legacyPlugin.js';
+import { modernUserAgents, legacyUserAgents } from './userAgents.ts';
 
 const modernCode = `
 class Foo {
@@ -16,13 +18,11 @@ async function doImport() {
 
 console.log(window?.foo?.bar);`;
 
-describe('legacyPlugin - transform js', function () {
-  this.timeout(10000);
-
+describe('legacyPlugin - transform js', { timeout: 10000 }, () => {
   for (const [name, userAgent] of Object.entries(modernUserAgents)) {
     it(`does not do any work on ${name}`, async () => {
       const { server, host } = await createTestServer({
-        rootDir: __dirname,
+        rootDir: import.meta.dirname,
         plugins: [
           {
             name: 'test',
@@ -39,7 +39,7 @@ describe('legacyPlugin - transform js', function () {
       const text = await fetchText(`${host}/app.js`, {
         headers: { 'user-agent': userAgent },
       });
-      expect(text.trim()).to.equal(modernCode.trim());
+      assert.equal(text.trim(), modernCode.trim());
       server.stop();
     });
   }
@@ -47,7 +47,7 @@ describe('legacyPlugin - transform js', function () {
   for (const [name, userAgent] of Object.entries(legacyUserAgents)) {
     it(`transforms to es5 on ${name}`, async () => {
       const { server, host } = await createTestServer({
-        rootDir: __dirname,
+        rootDir: import.meta.dirname,
         plugins: [
           {
             name: 'test',
@@ -78,7 +78,7 @@ describe('legacyPlugin - transform js', function () {
 
     it(`transforms to SystemJS when systemjs paramater is given ${name}`, async () => {
       const { server, host } = await createTestServer({
-        rootDir: __dirname,
+        rootDir: import.meta.dirname,
         plugins: [
           {
             name: 'test',
