js-temporal / temporal-polyfill

Polyfill for Temporal (under construction)
ISC License
529 stars 28 forks source link

Use a command line parser in runtest262. #218

Closed 12wrigja closed 1 year ago

12wrigja commented 1 year ago

This allows the test262 runner to update expected-failure files via a command line flag:

npm run test262 -- --update-expected-failure-files

If we use this a lot we could add that to package.json.

justingrant commented 1 year ago

This allows the test262 runner to update expected-failure files via a command line flag:

npm run test262 -- --update-expected-failure-files

Why is the first -- needed?

Also, is it getting complicated enough that it may be worth adding a separate CI run to verify that our command-line args work OK for this file? Also OK not to bother. Your call.

12wrigja commented 1 year ago

The first -- is to split the flags between npm itself and whatever the underlying script is. See https://docs.npmjs.com/cli/v9/commands/npm-run-script.

For the moment I don't think I'm going to add tests for the CLI, because I don't really know how I'd verify the wiring there without adjusting the script itself. Maybe some small additions to package.json to fail the test262 script if it doesn't see some "telltale" markers for the test runner?