-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Array.include return a wrapped Boolean
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
load("testsrc/assert.js"); | ||
|
||
assertEquals(2, [1, 2, 3, 4].filter(t => [1, 2].includes(t)).length); | ||
|
||
"success"; |
16 changes: 16 additions & 0 deletions
16
testsrc/org/mozilla/javascript/tests/ES7ArrayIncludesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package org.mozilla.javascript.tests; | ||
|
||
import org.mozilla.javascript.Context; | ||
import org.mozilla.javascript.drivers.LanguageVersion; | ||
import org.mozilla.javascript.drivers.RhinoTest; | ||
import org.mozilla.javascript.drivers.ScriptTestsBase; | ||
|
||
@RhinoTest("testsrc/jstests/es7-array-includes.js") | ||
@LanguageVersion(Context.VERSION_ES6) | ||
public class ES7ArrayIncludesTest extends ScriptTestsBase { | ||
} | ||
|