Add test for #182.

Closes #182.
This commit is contained in:
강동윤 2019-02-13 11:33:28 +09:00
parent 2d062432a8
commit bf128d295f

View File

@ -242,8 +242,9 @@ mod tests {
cm: tester.cm.clone(),
}
},
"",
"function _throw(e) {
"'use strict'",
"'use strict'
function _throw(e) {
throw e;
}
",
@ -251,6 +252,25 @@ mod tests {
)
}
#[test]
fn name_conflict() {
::tests::test_transform(
Default::default(),
|tester| {
helper!(throw);
InjectHelpers {
cm: tester.cm.clone(),
}
},
"let _throw = null",
"function _throw(e) {
throw e;
}
let _throw1 = null;
",
false,
)
}
#[test]
fn use_strict_abort() {
::tests::test_transform(