Skip to content

Commit

Permalink
Add a test for sourceFileName
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 30, 2021
1 parent 9af1b4e commit 96687f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,18 @@ fn tests(dir: PathBuf) {
.map(|_| ())
.expect("failed");
}

#[test]
fn opt_source_file_name_1() {
let res = str_with_opt(
"import Foo from 'foo';",
Options {
source_file_name: Some("entry".into()),
source_maps: Some(SourceMapsConfig::Bool(true)),
..Default::default()
},
)
.unwrap();

assert_eq!(res.to_string(), "")
}

0 comments on commit 96687f0

Please sign in to comment.