Skip to content

Add tests for TypedArrays#includes#641

Closed
leobalter wants to merge 2 commits into
tc39:masterfrom
bocoup:ta-includes
Closed

Add tests for TypedArrays#includes#641
leobalter wants to merge 2 commits into
tc39:masterfrom
bocoup:ta-includes

Conversation

@leobalter

Copy link
Copy Markdown
Member

No description provided.


sample = new TA(42);
assert.sameValue(sample.includes(0, 42), false);
assert.sameValue(sample.includes(0, 43), false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test would be more interesting if the array contained the searchElement (just like in fromIndex-infinity.js)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it contains the element, all of them are 0s.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arg, you are correct. I got confused by the second parameter, somehow.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revisited this file several times because of the second parameter as well, but they are still good assertions, I believe.

@jugglinmike

Copy link
Copy Markdown
Contributor

Nice work, Leo!

@leobalter

Copy link
Copy Markdown
Member Author

Thanks :)

@jugglinmike

Copy link
Copy Markdown
Contributor

Squashed and merged to master at commit 56b9888. Thanks, Leo! 🐲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants