1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-16 02:01:08 +00:00
serenity/Libraries/LibJS/Tests
mattco98 80fecc615a LibJS: Add spreading in array literals
Implement the syntax and behavor necessary to support array literals
such as [...[1, 2, 3]]. A type error is thrown if the target of the
spread operator does not evaluate to an array (though it should
eventually just check for an iterable).

Note that the spread token's name is TripleDot, since the '...' token is
used for two features: spread and rest. Calling it anything involving
'spread' or 'rest' would be a bit confusing.
2020-04-27 11:32:18 +02:00
..
add-values-to-primitive.js LibJS: Adding two values should convert them to primitives first 2020-04-15 09:48:25 +02:00
array-basic.js LibJS: Support empty values in array expression 2020-04-15 21:23:06 +02:00
array-length-setter.js LibJS: Implement Array length setter 2020-04-23 09:47:23 +02:00
array-spread.js LibJS: Add spreading in array literals 2020-04-27 11:32:18 +02:00
Array.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Array.prototype.concat.js LibJS: Add Array.prototype.concat 2020-04-17 16:14:28 +02:00
Array.prototype.filter.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Array.prototype.find.js LibJS: Add Array.prototype.find 2020-04-24 17:10:19 +02:00
Array.prototype.findIndex.js LibJS: Add Array.prototype.findIndex 2020-04-27 11:23:23 +02:00
Array.prototype.forEach.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Array.prototype.includes.js LibJS: Add Array.prototype.includes 2020-04-23 19:30:16 +02:00
Array.prototype.indexOf.js LibJS: Fix Array.prototype.indexOf fromIndex negative 2020-04-23 11:06:10 +02:00
Array.prototype.join.js LibJS: Check length property of Array.prototype.join in its test 2020-04-15 12:20:08 +02:00
Array.prototype.lastIndexOf.js LibJS: Add Array.prototype.lastIndexOf 2020-04-22 13:08:00 +02:00
Array.prototype.map.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Array.prototype.pop.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Array.prototype.push.js LibJS: Support multiple arguments in Array.prototype.push() 2020-04-14 13:40:04 +02:00
Array.prototype.reverse.js LibJS: Add Array.prototype.reverse 2020-04-20 17:26:46 +02:00
Array.prototype.shift.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Array.prototype.slice.js LibJS: Add Array.prototype.slice 2020-04-19 02:09:06 +02:00
Array.prototype.toString.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Array.prototype.unshift.js LibJS: Add Array.prototype.unshift() 2020-04-14 13:40:04 +02:00
arrow-functions.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
automatic-semicolon-insertion.js LibJS: Fix parsing of IfStatement, fixes #1829 2020-04-18 14:04:24 +02:00
binary-bitwise-left-shift.js LibJS: Implement bitwise left shift operator (<<) 2020-04-23 19:38:13 +02:00
binary-bitwise-or.js LibJS: Implement bitwise left shift operator (<<) 2020-04-23 19:38:13 +02:00
binary-bitwise-right-shift.js LibJS: Implement bitwise right shift operator (>>) 2020-04-23 19:38:13 +02:00
binary-bitwise-unsigned-right-shift.js LibJS: Implement bitwise unsigned right shift operator (>>>) 2020-04-23 19:38:13 +02:00
Boolean.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Boolean.prototype.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Boolean.prototype.toString.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Boolean.prototype.valueOf.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
comments-basic.js LibJS: Add missing load("test-common.js") to comments-basic.js 2020-04-14 17:26:57 +02:00
constructor-basic.js LibJS: Implement basic support for the "new" keyword 2020-03-28 16:33:52 +01:00
continue-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.now.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getDate.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getDay.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getFullYear.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getHours.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getMilliseconds.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getMinutes.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getMonth.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getSeconds.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Date.prototype.getTime.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
delete-basic.js LibJS: Implement basic support for the "delete" operator 2020-04-26 15:51:07 +02:00
delete-globalThis-property-crash.js LibJS: Grow storage when adding a property to uniquely-shaped Object 2020-04-26 19:05:08 +02:00
do-while-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Error.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Error.prototype.name.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Error.prototype.toString.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
exception-ReferenceError.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
exponentiation-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
for-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
for-no-curlies.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
function-length.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
function-missing-arg.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
function-this-in-arguments.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
function-TypeError.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Function.js LibJS: Remove outdated FIXME now that we have lexical environments 2020-04-16 09:41:07 +02:00
Function.prototype.apply.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Function.prototype.bind.js LibJS: Implement Function.prototype.bind() 2020-04-21 12:23:07 +02:00
Function.prototype.call.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Function.prototype.toString.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
in-operator-basic.js LibJS: Implement 'in' operator 2020-04-23 19:38:13 +02:00
Infinity-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
instanceof-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
invalid-lhs-in-assignment.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
isFinite.js LibJS: Implement Number.isFinite() 2020-04-26 20:36:59 +02:00
isNaN.js LibJS: Let isNaN() with no argument return true, add tests 2020-04-23 11:03:42 +02:00
let-scoping.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
logical-expressions-basic.js LibJS: Implement nullish coalescing operator (??) 2020-04-18 12:34:13 +02:00
logical-expressions-short-circuit.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math-constants.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.abs.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.ceil.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.cos.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.max.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.min.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.pow.js LibJS: Add Math.pow() 2020-04-23 19:38:13 +02:00
Math.sin.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.sqrt.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.tan.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Math.trunc.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
modulo-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
NaN-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Number-constants.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Number.isFinite.js LibJS: Implement Number.isFinite() 2020-04-26 20:36:59 +02:00
Number.isInteger.js LibJS: Implement Number.isInteger() 2020-04-26 20:36:59 +02:00
Number.isNaN.js LibJS: Implement Number.isNaN() 2020-04-26 20:36:59 +02:00
Number.isSafeInteger.js LibJS: Implement Number.isFinite() 2020-04-26 20:36:59 +02:00
Number.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Number.prototype.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
numeric-literals-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
object-basic.js LibJS: Implement computed properties in object expressions 2020-04-23 23:56:04 +02:00
Object.defineProperty.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Object.getOwnPropertyNames.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Object.getPrototypeOf.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Object.is.js LibJS: Implement Object.is() 2020-04-26 13:53:05 +02:00
Object.prototype.constructor.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Object.prototype.hasOwnProperty.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Object.prototype.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
Object.prototype.toString.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
parser-unary-associativity.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
run-tests LibJS: Let run-tests return 1 when not all tests pass 2020-04-20 22:44:13 +02:00
String.prototype.charAt.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.concat.js LibJS: Add String.prototype.concat 2020-04-16 16:36:51 +02:00
String.prototype.includes.js LibJS: Add String.prototype.includes 2020-04-25 16:54:25 +02:00
String.prototype.indexOf.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.padEnd.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.padStart.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.repeat.js LibJS: Add tests for String.prototype.repeat() 2020-04-20 11:41:25 +02:00
String.prototype.startsWith.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.substring.js LibJS: Add String.prototype.substring 2020-04-16 18:47:24 +02:00
String.prototype.toLowerCase.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.toString.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.toUpperCase.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
String.prototype.trim.js LibJS: Add String.prototype.{trim, trimStart, trimEnd} (#1792) 2020-04-15 08:47:40 +02:00
switch-basic-2.js LibJS: Use assertNotReached() in tests 2020-04-13 16:28:50 +02:00
switch-basic-3.js LibJS: Fix test files indentation (4 spaces) 2020-04-13 16:28:50 +02:00
switch-basic.js LibJS: Fix test files indentation (4 spaces) 2020-04-13 16:28:50 +02:00
switch-break.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
ternary-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
test-common.js LibJS: Remove default parameter from assertThrowsError() for now 2020-04-20 20:33:21 +02:00
throw-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
to-number-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
typeof-basic.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
update-expressions-basic.js LibJS: Improve UpdateExpression::execute() 2020-04-22 13:09:59 +02:00
var-multiple-declarator.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
var-scoping.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
variable-declaration.js LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
variable-undefined.js js/LibJS: Move test functions to pure javascript. 2020-04-14 12:55:31 +02:00
void-basic.js LibJS: Implement void operator 2020-04-15 19:12:51 +02:00
while-basic.js LibJS: Parse while statements 2020-04-22 11:48:14 +02:00