-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for Array.fromAsync #3725
Comments
Thanks @Aditi-1400! FTR, a number of those tests are already written but need to get PRd |
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Mar 31, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at tc39#3791. This covers the following items from the testing plan at tc39#3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Mar 31, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at tc39#3791. This covers the following items from the testing plan at tc39#3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Apr 4, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at tc39#3791. This covers the following items from the testing plan at tc39#3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Apr 4, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at tc39#3791. This covers the following items from the testing plan at tc39#3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values
Ms2ger
pushed a commit
to ptomato/test262
that referenced
this issue
Apr 4, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at tc39#3791. This covers the following items from the testing plan at tc39#3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values
Ms2ger
added a commit
that referenced
this issue
Apr 4, 2023
This contains a few more tests for Array.fromAsync, in addition to what has already been merged and what is under review at #3791. This covers the following items from the testing plan at #3725: - Success cases - Creates promise - Create new array/arraylike in promise (with length = length property) - Input - Invalid input values - nonconforming object (arraylike without length, missing keys) - Covered by polyfill tests - Result promise rejects if length access fails (non-iterable input) - Unaffected by globalThis.Symbol mutation (non-iterable) - this-value - this-value is a constructor - this-value is not a constructor - If this is a constructor, and items doesn't have a Symbol.iterator, returns a new instance of this - Iterator closed when property creation on this fails - Returned promise rejects when ^ - Other tests - Error is thrown for all CreateDataProperty fails - Non-writable properties are overwritten by CreateDataProperty - Input with missing values Co-authored-by: Ms2ger <[email protected]>
ptomato
pushed a commit
that referenced
this issue
Apr 7, 2023
This PR adds some more tests for Array.fromAsync proposal. It includes most of the tests defined in https://github.com/es-shims/array-from-async/blob/main/test.mjs See:#3725
There are two things left on the list:
I'm not sure what the idea is for the array with boundary values. My opinion about the second item is that we probably don't need to test the timing. |
Let's say this is done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal readme
Proposal Spec Text
Testing plan
Standard tests: Array.fromAsync: Boilerplate tests #3747
Brand check- I think this covered by "this
value is not a constructor" below(blocked?)Basic Functionality
Arguments
Input - Add tests for the asyncItems argument to Array.fromAsync. #3754
Invalid input values:
undefined
null
Valid inputs:
Tests for input
Input array with boundary values
Covered by polyfill tests: - Add some Array.from async tests #3791
Result promise rejects if input length exceeds safe integersseems impractical, tests time outMapfn - Tests for mapfn and thisArg arguments to Array.fromAsync #3790
Invalid mapfn (Non callable)
null
{}
Valid mapfn
Tests for valid mapfn (All tests are covered in polyfill tests)
Tests for closing iterator and returned promise rejects
ThisArg - Tests for mapfn and thisArg arguments to Array.fromAsync #3790
this
value - Array.fromAsync various remaining coverage #3809this
value is a constructorthis
value is not a constructorthis
failsOther Tests
Symbol.iterator
attributeCo-authored by: @Ms2ger @ptomato @cjtenny
The text was updated successfully, but these errors were encountered: