summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests
AgeCommit message (Collapse)Author
2021-12-09LibJS: Implement Intl.DateTimeFormat.prototype.formatRangeTimothy Flynn
2021-12-08LibJS/Tests: Enable two more skipped tests which now passLinus Groh
Only two skipped tests remaining overall :^)
2021-12-08LibJS: Implement Intl.DateTimeFormat.prototype.formatToPartsTimothy Flynn
2021-12-08LibJS: Implement (most of) Intl.DateTimeFormat.prototype.formatTimothy Flynn
There are a few FIXMEs that will need to be addressed, but this implements most of the prototype method. The FIXMEs are mostly related to range formatting, which has been entirely ignored so far. But other than that, the following will need to be addressed: * Determining flexible day periods must be made locale-aware. * DST will need to be determined and acted upon. * Time zones other than UTC and calendars other than Gregorian are ignored. * Some of our results differ from other engines as they have some format patterns we do not. For example, they seem to have a lonely {dayPeriod} pattern, whereas our closest pattern is "{hour} {dayPeriod}".
2021-12-08LibJS: Do not override hour, minute, and second format field lengthsTimothy Flynn
This was an oversight in e42d954743056e476bbb1623cfc60e7797a8a6ca. These fields should always follow the locale preference in the CLDR. Overriding these fields would permit formats like "h:mm:ss" to result in strings like "1:2:3" instead of "1:02:03".
2021-12-08LibJS+LibUnicode: Generate missing patterns with fractionalSecondDigitsTimothy Flynn
TR-35's Matching Skeleton algorithm dictates how user requests including fractional second digits should be handled when the CLDR format pattern does not include that field. When the format pattern contains {second}, but does not contain {fractionalSecondDigits}, generate a second pattern which appends "{decimal}{fractionalSecondDigits}" to the {second} field.
2021-12-06LibJS: Add tests for calendar fields of DateTimeFormat's resolvedOptionsTimothy Flynn
These are (mostly) testable now that LibUnicode parses format patterns.
2021-12-01LibUnicode: Do not generate data for "generic" calendarsTimothy Flynn
This is not a calendar supported by ECMA-402, so let's not waste space with its data. Further, don't generate "gregorian" as a valid Unicode locale extension keyword. It's an invalid type identifier, thus cannot be used in locales such as "en-u-ca-gregorian".
2021-11-30LibJS/Tests: Fix typo in a test descriptionLinus Groh
2021-11-30LibJS: Don't match async \n function as an async function declarationdavidot
2021-11-30LibJS: Replace the verify in private identifier with a syntax errordavidot
Since sometimes expressions are parsed without checking we can hit this expression without it being followed by an 'in'.
2021-11-30LibJS: Stop parsing an expression on comma after a yielddavidot
2021-11-30LibJS: Disallow member expression in binding pattern as parametersdavidot
2021-11-30LibJS: Disallow shorthand properties with reserved namesdavidot
2021-11-30LibJS: Allow defining class fields with "keyword" namesdavidot
2021-11-30LibJS: Disallow await keywords in static init blocksdavidot
In static init blocks 'await' cannot be used. Note that this does not cover all the cases since the parser currently cannot distinguish between expressions within parenthesis and direct expressions.
2021-11-30LibJS: Disallow '\8' and '\9' in strict mode due to being octal escapesdavidot
2021-11-30LibJS: Allow escaped 'async' as identifierdavidot
Since 'async' is only special if it occurs before a function it can be used as escaped identifier in all cases.
2021-11-30LibJS: Treat private identifier as divisible tokendavidot
And also make sure private identifiers are correctly checked when synthesizing a binding pattern.
2021-11-30LibJS: Disallow numerical separators in octal numbers and after '.'davidot
2021-11-30LibJS: Allow object properties called 'async'davidot
2021-11-30LibJS: Add messages to the toEval and toEvalTo testsdavidot
This makes it a lot easier to understand what is going wrong when an eval test fails. As an example instead of just getting: `ExpectationError` You would now get: `ExpectationError: Expected _1_2E+0_1_ to eval to _12_ but got _120_`.
2021-11-29LibJS: Implement Temporal.Duration.prototype.subtractLuke Wilde
2021-11-29LibJS: Implement Temporal.Duration.prototype.addLuke Wilde
2021-11-29LibJS: Implement Temporal.Duration.prototype.roundLuke Wilde
2021-11-29LibJS: Implement Intl.DateTimeFormat.prototype.resolvedOptionsTimothy Flynn
2021-11-29LibJS: Implement Intl.DateTimeFormat.supportedLocalesOfTimothy Flynn
2021-11-29LibJS+LibUnicode: Implement the Intl.DateTimeFormat constructorTimothy Flynn
2021-11-29LibJS: Implement a nearly empty Intl.DateTimeFormat objectTimothy Flynn
This adds plumbing for the Intl.DateTimeFormat object, constructor, and prototype. Note that unlike other Intl objects, the Intl.DateTimeFormat object has a LibUnicode structure as a base. This is to prevent wild amounts of code duplication between LibUnicode, Intl.DateTimeFormat, and other not-yet-defined Intl structures, because there's 12 fields shared between them.
2021-11-29LibJS: Implement parsing and executing for-await-of loopsdavidot
2021-11-28LibJS: Implement parsing of TemporalDurationStringLinus Groh
2021-11-27LibJS: Implement Temporal.PlainYearMonth.prototype.since()Linus Groh
2021-11-27LibJS: Implement Temporal.PlainYearMonth.prototype.until()Linus Groh
2021-11-27LibJS: Implement Temporal.PlainYearMonth.prototype.subtract()Linus Groh
2021-11-27LibJS: Implement Temporal.PlainYearMonth.prototype.add()Linus Groh
2021-11-27LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceededIdan Horowitz
These seem more appropriate.
2021-11-24LibJS: Implement Temporal.ZonedDateTime.prototype.since()Linus Groh
2021-11-24LibJS: Implement Temporal.ZonedDateTime.prototype.until()Linus Groh
2021-11-24LibJS: Don't accept UTC designators in strings for plain Temporal typesLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/cd2dc7d
2021-11-24LibJS: Fix parse ErrorType used in parse_temporal_date_string()Linus Groh
TemporalInvalidDateString, not TemporalInvalidDateTimeString.
2021-11-21LibJS: Parse async generator functionsdavidot
2021-11-21LibJS: Parse async arrow functionsdavidot
2021-11-21LibJS: Implement Temporal.PlainDateTime.prototype.since()Linus Groh
2021-11-21LibJS: Implement Temporal.PlainDateTime.prototype.until()Linus Groh
2021-11-21LibJS: Implement Temporal.PlainTime.prototype.since()Linus Groh
2021-11-21LibJS: Implement Temporal.PlainTime.prototype.until()Linus Groh
2021-11-20LibJS: Implement parsing of TemporalInstantStringLinus Groh
2021-11-20LibJS: Implement parsing of TemporalCalendarStringLinus Groh
2021-11-20LibJS: Implement parsing of TemporalRelativeToStringLinus Groh
2021-11-20LibJS: Implement parsing of TemporalZonedDateTimeStringLinus Groh