tc39 / tc39/test262

Update RegExp tests for \w, \W, \b & \B

Open
#705 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

ECMA 262 issue 525 Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B is now closed.

Please update and/or add tests for the changed behavior of \w, \W, \b and B. The new expected behavior includes:

    /\w/iu.test('\u017F') // true
    /\w/iu.test('\u212A') // true
    /\W/iu.test('\u017F') // false
    /\W/iu.test('\u212A') // false
    /\W/iu.test('s')      // false
    /\W/iu.test('S')      // false
    /\W/iu.test('K')      // false
    /\W/iu.test('k')      // false
    /\b/iu.test('\u017F') // true
    /\b/iu.test('\u212A') // true
    /\b/iu.test('s')      // true
    /\b/iu.test('S')      // true
    /\B/iu.test('\u017F') // false
    /\B/iu.test('\u212A') // false
    /\B/iu.test('s')      // false
    /\B/iu.test('S')      // false
    /\B/iu.test('K')      // false
    /\B/iu.test('k')      // false

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

Locate the existing RegExp tests covering \w, \W, \b, and \B, then review the examples in this issue against the updated ECMA-262 behavior. Update or add assertions for the listed Unicode and ASCII cases, and consider the work complete when the tests reflect every expected true and false result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.