diff --git a/packages/dev-server-esbuild/test/fixture/a/b/foo.ts b/packages/dev-server-esbuild/test/fixture/a/b/foo.ts index d8c813adf..b334a10b3 100644 --- a/packages/dev-server-esbuild/test/fixture/a/b/foo.ts +++ b/packages/dev-server-esbuild/test/fixture/a/b/foo.ts @@ -1,4 +1,6 @@ -// a comment +class SomeClass { + prop: string +} import 'some-lib/some-file.js'; import '../../x.js'; diff --git a/packages/dev-server-esbuild/test/fixture/tsconfig.json b/packages/dev-server-esbuild/test/fixture/tsconfig.json index 9bc73946f..5056d0928 100644 --- a/packages/dev-server-esbuild/test/fixture/tsconfig.json +++ b/packages/dev-server-esbuild/test/fixture/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "removeComments": false + "target": "es2022", + "useDefineForClassFields": true } } diff --git a/packages/dev-server-esbuild/test/ts.test.ts b/packages/dev-server-esbuild/test/ts.test.ts index 7082088ab..fc07587e2 100644 --- a/packages/dev-server-esbuild/test/ts.test.ts +++ b/packages/dev-server-esbuild/test/ts.test.ts @@ -245,7 +245,7 @@ class Bar { }); - it('reads tsconfig.json file', async () => { + it.only('reads tsconfig.json file', async () => { const { server, host } = await createTestServer({ rootDir: path.join(__dirname, 'fixture'), plugins: [ @@ -265,7 +265,7 @@ class Bar { 'application/javascript; charset=utf-8', ); - expectIncludes(text, '// a comment'); + expectIncludes(text, '__publicField(this, "prop");'); } finally { server.stop(); }