tc39 / tc39/test262

Missing coverage: Resizable / Growable (Shared)ArrayBuffers: Missing tests for some Array.prototype functions

Open
#3,349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.8k
Forks
564
Avg merge
3d 7h
Merged PRs (30d)
10

Description

There are tests like built-ins/Array/prototype/every/callbackfn-resize-arraybuffer , which invoke an Array.prototype.function with a TypedArray with resizable backing. But looks like we don't have tests for all funcs in Array.prototype. E.g., Array.prototype.join etc.

E.g., V8 currently has a "bug" or rather a missing implementation, that we don't use the correct length when you do Array.prototype.something.call(taWithResizableBacking). But there's no test262 testing failing because of this, as far as I can see.

We'd probably need tests which make the call 1) before resizing 2) after resizing, to make sure we always use the correct length.

cc @jugglinmike @syg

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading built-ins/Array/prototype/every/callbackfn-resize-arraybuffer and compare its coverage with the other Array.prototype functions. Add corresponding tests for calls before and after resizing a TypedArray with resizable backing, including cases such as Array.prototype.join. Done means the relevant functions use the correct length in both scenarios and the tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.