blob: 7d23222fd81943e2972095314e5beea69ebfc79d [file]
package org.mozilla.javascript;
import org.junit.jupiter.api.Test;
import org.mozilla.javascript.testutils.Utils;
class EvalTest {
@Test
void evalFunctionIsUndefinedInEs6() {
Utils.assertWithAllModes_ES6("undefined", "typeof eval('function f(){}')");
}
@Test
void evalFunctionReturnsFunctionInOlderVersions() {
Utils.assertWithAllModes_1_8("function", "typeof eval('function f(){}')");
}
}