These tests did not fully cover Temporal.Duration.prototype.round and
Temporal.Duration.prototype.total because they called those methods on a
blank duration (all components zero), for which there is an early return
in round() and total().
This meant that we missed an assertion that would be hit after the early
return.
This makes sure to test both blank and non-blank Durations with these
relativeTo strings, and expect some strings to fail at different steps
with the two cases.
See: tc39/proposal-temporal#3015
Our config files specify two-space indents for JS files. These scripts
were probably written before that was a thing. Update the indentation of
the script and the generated tests all in one go.
The optimizations from commit e558b29b were never incorporated into the
upstream test generator. This does so now.
As far as I can tell, the changes to the Unicode ranges are purely
cosmetic. Some are formatted as 6-digit hex numbers instead of 4-digit.
Others move the low-surrogates range 0xDC00-0xDCFF to the beginning of the
array, but the union of the ranges is still the same.
This code hasn't been touched in a while, so it's probably good to bring
in the newest versions of the dependencies. We can easily tell if there
was any incompatible effect on the output.
The latest version of filenamify requires using ES modules. We also have
to adapt to a breaking change in regexpu-core (see
https://github.com/mathiasbynens/regexpu-core/pull/49).
Also convert the dependencies to devDependencies, since this tool is not
necessary for executing test262.
Since we are using it in the other jobs, we may as well use it here. As a
bonus, it will make the job work even if the target of the pull request
isn't the main branch.
Most of the time, we are not committing changes to the tools. Move the
unit tests for the lint and generation tools to a separate PR workflow,
that is only run if anything in the tools/ folder is modified in the PR.
This saves time in the normal case.
This runs faster and allows for future improvements.
Similar to the linter workflow, we remove the Circle-CI-specific stuff
from the file in tools/scripts/, and into .github/workflows/.
We use another external action (tj-actions/verify-changed-files) to check
that generating the tests didn't create any new changes. This is basically
a companion action to the tj-actions/changed-files used in the linter job.
This should help contributors notice and fix linter errors when they
occur. Apparently it's as easy as printing a magic string to stdout, who
knew!
The lint tool doesn't give line numbers so we place the annotations at
line 1 for the time being.
After the previous commit, it doesn't do much, only passes the linting
exceptions file on the command line. Instead, make the lint.exceptions
file the default for that argument (if it exists), and remove the shell
script.
This runs faster and allows for future improvements.
I'm following a general principle of keeping code that isn't portable
between CI providers inside the config file for the CI provider. So in
this case we remove the Circle-CI-specific stuff from the file in
tools/scripts/, and into .github/workflows/. We use an external action
(tj-actions/changed-files) to gather the list of files to lint.