From 4ad3ba85017f8f910e6d9f9afafabb34c5dc77ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 19 Dec 2024 16:36:18 +0100 Subject: [PATCH] Add test for comments around `defer` --- tests/baselines/reference/importDeferComments.js | 13 +++++++++++++ .../baselines/reference/importDeferComments.symbols | 10 ++++++++++ tests/baselines/reference/importDeferComments.types | 11 +++++++++++ .../conformance/importDefer/importDeferComments.ts | 6 ++++++ 4 files changed, 40 insertions(+) create mode 100644 tests/baselines/reference/importDeferComments.js create mode 100644 tests/baselines/reference/importDeferComments.symbols create mode 100644 tests/baselines/reference/importDeferComments.types create mode 100644 tests/cases/conformance/importDefer/importDeferComments.ts diff --git a/tests/baselines/reference/importDeferComments.js b/tests/baselines/reference/importDeferComments.js new file mode 100644 index 0000000000000..3e7980dbc1665 --- /dev/null +++ b/tests/baselines/reference/importDeferComments.js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/importDefer/importDeferComments.ts] //// + +//// [a.ts] +export {}; + +//// [b.ts] +/*1*/ import /*2*/ defer /*3*/ * /*4*/ as /*5*/ aNs /*6*/ from /*7*/ "a" /*8*/; + + +//// [a.js] +export {}; +//// [b.js] +export {}; diff --git a/tests/baselines/reference/importDeferComments.symbols b/tests/baselines/reference/importDeferComments.symbols new file mode 100644 index 0000000000000..fec1187392018 --- /dev/null +++ b/tests/baselines/reference/importDeferComments.symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/importDefer/importDeferComments.ts] //// + +=== a.ts === + +export {}; + +=== b.ts === +/*1*/ import /*2*/ defer /*3*/ * /*4*/ as /*5*/ aNs /*6*/ from /*7*/ "a" /*8*/; +>aNs : Symbol(aNs, Decl(b.ts, 0, 24)) + diff --git a/tests/baselines/reference/importDeferComments.types b/tests/baselines/reference/importDeferComments.types new file mode 100644 index 0000000000000..6f06fb95216ac --- /dev/null +++ b/tests/baselines/reference/importDeferComments.types @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/importDefer/importDeferComments.ts] //// + +=== a.ts === + +export {}; + +=== b.ts === +/*1*/ import /*2*/ defer /*3*/ * /*4*/ as /*5*/ aNs /*6*/ from /*7*/ "a" /*8*/; +>aNs : typeof aNs +> : ^^^^^^^^^^ + diff --git a/tests/cases/conformance/importDefer/importDeferComments.ts b/tests/cases/conformance/importDefer/importDeferComments.ts new file mode 100644 index 0000000000000..ce480f94260af --- /dev/null +++ b/tests/cases/conformance/importDefer/importDeferComments.ts @@ -0,0 +1,6 @@ +// @module: esnext +// @filename: a.ts +export {}; + +// @filename: b.ts +/*1*/ import /*2*/ defer /*3*/ * /*4*/ as /*5*/ aNs /*6*/ from /*7*/ "a" /*8*/;