Skip to content

Commit

Permalink
Set MozillaSuiteTest language version explicitly to 1.8
Browse files Browse the repository at this point in the history
Several tests failed after changing the ShellContextFactory default language version to ES6.
  • Loading branch information
tonygermano authored and gbrail committed Sep 17, 2024
1 parent 06d5f67 commit b08de52
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.drivers.JsTestsBase;
import org.mozilla.javascript.drivers.ShellTest;
import org.mozilla.javascript.drivers.TestUtils;
Expand Down Expand Up @@ -194,6 +195,7 @@ public void runMozillaTest() throws Exception {
// optimizationLevel);
final ShellContextFactory shellContextFactory = new ShellContextFactory();
shellContextFactory.setOptimizationLevel(optimizationLevel);
shellContextFactory.setLanguageVersion(Context.VERSION_1_8);
ShellTestParameters params = new ShellTestParameters();
JunitStatus status = new JunitStatus();
ShellTest.runNoFork(shellContextFactory, jsFile, params, status);
Expand Down

0 comments on commit b08de52

Please sign in to comment.