From e535417d8f7b61a021d71597edd44c27b9bd381a Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 17 Sep 2024 11:45:41 +0800 Subject: [PATCH] test(cli): Testcase for #9559 --- crates/swc_cli_impl/tests/issues.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/swc_cli_impl/tests/issues.rs b/crates/swc_cli_impl/tests/issues.rs index 5d29cd012456..daccc404202d 100644 --- a/crates/swc_cli_impl/tests/issues.rs +++ b/crates/swc_cli_impl/tests/issues.rs @@ -144,6 +144,20 @@ fn issue_8667_1() -> Result<()> { Ok(()) } +#[test] +fn issue_9559() -> Result<()> { + let sandbox = TempDir::new()?; + fs::write(sandbox.path().join("index.ts"), r"console.log('Hello')")?; + fs::create_dir(sandbox.path().join("chart.js"))?; + + let mut cmd = cli()?; + cmd.current_dir(&sandbox).arg("compile").arg(sandbox.path()); + + cmd.assert().success(); + + Ok(()) +} + /// ln -s $a $b fn symlink(a: &Path, b: &Path) { #[cfg(unix)]