summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-10-13 08:55:28 -0400
committerGitHub <noreply@github.com>2021-10-13 08:55:28 -0400
commit43a63530acb16e57cbb190eacedbd097c536a775 (patch)
treee69e18bc5c536b63a8bb7b426cdf8d266217bd4c /cli
parentd5a7a6d5756dd55a651d43bb9d47bade80bcca86 (diff)
chore: test for bundling export specifier with alias (#12421)
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/integration/bundle_tests.rs5
-rw-r--r--cli/tests/testdata/bundle/file_tests-fixture16.ts6
-rw-r--r--cli/tests/testdata/bundle/file_tests-fixture16_2.ts2
-rw-r--r--cli/tests/testdata/bundle/fixture16.out6
4 files changed, 19 insertions, 0 deletions
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs
index 4e68af0b1..9010ec9b1 100644
--- a/cli/tests/integration/bundle_tests.rs
+++ b/cli/tests/integration/bundle_tests.rs
@@ -373,3 +373,8 @@ itest!(ts_decorators_bundle {
args: "bundle ts_decorators_bundle.ts",
output: "ts_decorators_bundle.out",
});
+
+itest!(bundle_export_specifier_with_alias {
+ args: "bundle bundle/file_tests-fixture16.ts",
+ output: "bundle/fixture16.out",
+});
diff --git a/cli/tests/testdata/bundle/file_tests-fixture16.ts b/cli/tests/testdata/bundle/file_tests-fixture16.ts
new file mode 100644
index 000000000..5d0b05e92
--- /dev/null
+++ b/cli/tests/testdata/bundle/file_tests-fixture16.ts
@@ -0,0 +1,6 @@
+// todo(dsherret): use ./subdir/a.ts once fixtures are restored
+export { a as test1 } from "./file_tests-fixture16_2.ts";
+export { a as test2 } from "./file_tests-fixture16_2.ts";
+import { a } from "./file_tests-fixture16_2.ts";
+
+console.log(a);
diff --git a/cli/tests/testdata/bundle/file_tests-fixture16_2.ts b/cli/tests/testdata/bundle/file_tests-fixture16_2.ts
new file mode 100644
index 000000000..7115949c9
--- /dev/null
+++ b/cli/tests/testdata/bundle/file_tests-fixture16_2.ts
@@ -0,0 +1,2 @@
+// todo(dsherret): delete this and use ./subdir/a.ts in the file once fixtures are restored
+export const a = "a";
diff --git a/cli/tests/testdata/bundle/fixture16.out b/cli/tests/testdata/bundle/fixture16.out
new file mode 100644
index 000000000..5e21c2a71
--- /dev/null
+++ b/cli/tests/testdata/bundle/fixture16.out
@@ -0,0 +1,6 @@
+[WILDCARD]
+const a = "a";
+export { a as test1 };
+export { a as test2 };
+console.log(a);
+