stream: initial port of test262 tests#41775
Conversation
|
Review requested:
|
This comment has been minimized.
This comment has been minimized.
|
Why copy paste the tests instead of running test262 directly? |
|
@ljharb well - few reasons:
Though this is mostly just my intuition and I recently started - it's possible there is a way to run test262 tests in Node I'm not aware of and to somehow tell it to use a different object with construction methods (like Readable.from instead of AsyncIterator.from) and exclude specific tests but that seemed like a lot more work than just porting them and checking every few months what changed and porting that. |
|
@benjamingr those are good points. i think it'd be useful if test262 allowed you to point the tests at an arbitrary object - but the only way to do it now would probably be to use |
|
Moving to draft to not trigger many github cis |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@nodejs/streams ping |
| // These tests are manually ported from the draft PR for the test262 test suite | ||
| // Authored by Rick Waldron in https://github.com/tc39/test262/pull/2818/files | ||
|
|
||
| // test262 license: |
There was a problem hiding this comment.
This arguably should be added to LICENSE instead with a comment here indicating that's where the relevant license info is located. But not blocking.
|
Landed in 662fb5f |
PR-URL: #41775 Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
@benjamingr when pulling in for the v16 for a patch release, this breaks the build. I am not sure if this is dependent on a semver minor change, or needs a backport - do you mind taking a look? Thank you. |
|
@danielleadams it depends on a previous semver-major patch (adding these methods). |
|
@benjamingr got it. thanks! |
PR-URL: #41775 Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #41775 Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#41775 Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This adds some test262 tests from tc39/test262#2818 to Node's implementation of iterator-helpers + a few fixes.
I want to do this in batches since it will probably require a bunch of changes (this one just adds the ones for asIndexedPairs and drop as they make sense).
cc @nodejs/streams @ljharb @rwaldron (sorry for the no context ping Rick! thought I'd give you a heads up we're going to use all of these we can unless there is something else I should be aware of!)