The `arrayContains` function has a number of deficiencies which make it
inappropriate for Test262:
- It apparently isn't very useful: despite being available for over 7
years, fewer than ten tests use it
- It's misleading: its documentation reads, "Verify that a subArray is
contained within an array." In reality, it only verifies that all the
elements of one array are present in another--order does not matter.
- It's not ergonomic for test authors: it has been misused to create
tests that were prone to false positives [1]
- It's not ergonomic for implementers: ostensibly designed for use with
`assert`, the failure messages produced by tests that use it do not
necessarily have very much context
All code in the "harness" directory adds to the total amount of
project-specific information which contributors are expected to to
learn. In light of the above deficiencies, the burden of this particular
harness file is unjustified.
Remove the harness file and its associated tests. Update the tests which
depend on it to express their expectations using alternate methods, and
strengthen the tests to assert element order wherever appropriate.
[1] https://github.com/tc39/test262/pull/3289
This reverts commit b690cb67be, reversing
changes made to 50dd431dff. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
* Temporal.now.plainDateTime: import tests from prop
* Add required metadata
* Correct invalid test
Ensure the error is thrown due to the invocation of the provided method.
Add a separate test to verify how the method is invoked.
* Remove duplicated assertions
* Improve coverage
* Rewrite test to focus on Calendar parameter
The observable interactions with the "timeZone" parameter are verified
by another test which is named for that purpose.
* Remove non-standard test
This test's title suggests that it was intended to verify the behavior
when the "calendar" parameter was undefined. The expected behavior in
that case depends on the presence of a builtin calendar named
"undefined." Test262 cannot definitively assert the presence or absence
of such a calendar.
In contrast to the title, the test body actually uses the calendar name
"japanese." Test262 cannot definitively assert the presence or absence
of such a calendar.
* Fix test for only {localeMatcher: "lookup"}
The expectation that "sr-Thai-RS" would be returned is only true with the
9.2.2 BestAvailableLocale ( availableLocales, locale )
https://tc39.es/ecma402/#sec-bestavailablelocale
algorithm used by 9.2.3 LookupMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-lookupmatcher
The default for localeMatcher is "best fit" but not "lookup" for all Intl objects.
And for 9.2.4 BestFitMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-bestfitmatcher
It may not match "sr-Thai-RS" for "sr" and return ["de", "zh-CN"] instead. Therefore, we need to change this test to only test on {localeMatcher: "lookup"}
* Add option to getLocaleSupportInfo
Needed to test different localeMatcher
* only test for "lookup" localeMatcher
* Get the info based on the localeMatcher
* pass in localeMatcher to getLocaleSupportInfo
This code is setting values to $1 etc., which can be non-writable or accessors.
For example, https://github.com/tc39/proposal-regexp-legacy-features/ is specifying them as accessors, and they should throw an error when
it is done in strict code. We should execute `(/(?:)/).test("");` to clear them.
The WeakRefs proposal advanced to Stage 4 but cleanupSome moved back to a Stage 2 status.
The tests should remain in Test262 for now but this feature flag should help users to
filter tests out.