Invalid explicit resource management tests in `staging`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- testing-qa
Research direction
The reported cases are in test/staging/explicit-resource-management/await-using-in-switch-case-block.js and call-dispose-methods.js. Review the failing switch-case declarations, remove the invalid test cases identified in the issue, then rerun the relevant Babel/Test262 results to confirm these parser errors are no longer reported.
Written by the indexing model from the issue text.
Description
From Babel's test results:
not ok 44949 test/staging/explicit-resource-management/await-using-in-switch-case-block.js default # (expected success, got parser error)
---
name: SyntaxError
message: >-
unknown: Using declaration cannot appear in the top level when source type is
`script` or in the bare case statement. (358:6)
356 | switch (label) {
357 | case 1:
> 358 | await using x = {
| ^
359 | value: 1,
360 | [Symbol.asyncDispose]() {
361 | caseBlockValues.push(42);
...
not ok 44951 test/staging/explicit-resource-management/await-using-in-switch-case-block.js strict mode # (expected success, got parser error)
---
name: SyntaxError
message: >-
unknown: Using declaration cannot appear in the top level when source type is
`script` or in the bare case statement. (359:6)
357 | switch (label) {
358 | case 1:
> 359 | await using x = {
| ^
360 | value: 1,
361 | [Symbol.asyncDispose]() {
362 | caseBlockValues.push(42);
...
not ok 44975 test/staging/explicit-resource-management/call-dispose-methods.js default # (expected success, got parser error)
---
name: SyntaxError
message: >-
unknown: Using declaration cannot appear in the top level when source type is
`script` or in the bare case statement. (244:6)
242 | switch (label) {
243 | case 1:
> 244 | using x = {
| ^
245 | value: 1,
246 | [Symbol.dispose]() {
247 | caseBlockValues.push(42);
...
not ok 44976 test/staging/explicit-resource-management/call-dispose-methods.js strict mode # (expected success, got parser error)
---
name: SyntaxError
message: >-
unknown: Using declaration cannot appear in the top level when source type is
`script` or in the bare case statement. (245:6)
243 | switch (label) {
244 | case 1:
> 245 | using x = {
| ^
246 | value: 1,
247 | [Symbol.dispose]() {
248 | caseBlockValues.push(42);
...
These test cases are invalid since last plenary, and they should be removed eventually.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 571
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tc39/test262
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tc39/test262#5190 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tc39/test262#5185 · 7 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tc39/test262#5159 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tc39/test262#5133 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
area: ui Bug Payload OSS
Difficulty 1/5 Under an hour Newbie friendliness 88/100
payloadcms/payload#19839 ·
Maintainers usually reply within 1 day