Skip to content

Commit 659a717

Browse files
committed
Update tests
1 parent c4c303e commit 659a717

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lexer/src/test.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,16 @@ mod tests {
666666
assert_eq!(exports.join(","), "foo,greeting");
667667
}
668668

669+
#[test]
670+
fn parse_cjs_exports_case_20_5() {
671+
let source = r#"
672+
var title = exports.name = exports.title = exports.short = "untitled";
673+
"#;
674+
let lexer = CommonJSModuleLexer::init("index.cjs", source).expect("could not parse the module");
675+
let (exports, _) = lexer.analyze("production", true);
676+
assert_eq!(exports.join(","), "name,title,short");
677+
}
678+
669679
#[test]
670680
fn parse_cjs_exports_case_21_1() {
671681
let source = r#"

0 commit comments

Comments
 (0)