Skip to content

test: change WPT status files into CommonJS files - #45826

Closed
panva wants to merge 2 commits into
nodejs:mainfrom
panva:wpt-update-status-files
Closed

test: change WPT status files into CommonJS files#45826
panva wants to merge 2 commits into
nodejs:mainfrom
panva:wpt-update-status-files

Conversation

@panva

@panvapanva commented Dec 12, 2022

Copy link
Copy Markdown
Member

This PR updates the WPT status files to be .js files.

The motivation for this change is to be able to use the javascript syntax to minimize the likelyhood of conflicts when adding/removing expectations and to allow for comments to be added for test blocks that may be failing for a specificic reason.

This would also allow to make more failures optional depending on config rather than current workaround being flaky, e.g. the console expectations file could be:

'use strict';consthasCrypto=Boolean(process.versions.openssl);consthasIntl=!!process.config.variables.v8_enable_i18n_support;constidlharnessFailures=[];if(!hasCrypto||!hasIntl){idlharnessFailures.push(// https://github.com/nodejs/node/issues/44185#issuecomment-1219388742'console namespace: operation assert(optional boolean, any...)','console namespace: operation table(optional any, optional sequence<DOMString>)','console namespace: operation dir(optional any, optional object?)');}module.exports={'idlharness.any.js': {fail: {expected: idlharnessFailures,},},};

The linter is configured to support that (newline for every array element, newline for array brackets). max-len is disabled because we cannot control the length of WPT test names and want them to fit on a single line.

@panvapanva added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Dec 12, 2022
@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 12, 2022
@panva

Copy link
Copy Markdown
MemberAuthor

I've also considered yaml or json5 but felt CJS is more at home here and the present js linter can maintain the status files better.

@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 12, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 12, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@panva

Copy link
Copy Markdown
MemberAuthor

I will deal with merge conflicts when landing this.

@panvapanva added the review wanted PRs that need reviews. label Dec 16, 2022
@panva
panvaforce-pushed the wpt-update-status-files branch from f9de90d to 39c0f19CompareDecember 20, 2022 13:46
@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2022
@panva

Copy link
Copy Markdown
MemberAuthor

cc @nodejs/testing

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

Comment threadtest/common/wpt.js Outdated
@panva
panvaforce-pushed the wpt-update-status-files branch from 39c0f19 to 414ba16CompareDecember 23, 2022 10:02
@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@joyeecheungjoyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RSLGTM with a nit.

Comment threadtest/common/wpt.js Outdated
Comment threadtest/wpt/README.md Outdated
@panvapanva removed the review wanted PRs that need reviews. label Jan 9, 2023
@panva
panvaforce-pushed the wpt-update-status-files branch from 414ba16 to 98de155CompareFebruary 13, 2023 08:57
@panvapanva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. review wanted PRs that need reviews. request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. review wanted PRs that need reviews. labels Feb 13, 2023
@panva

Copy link
Copy Markdown
MemberAuthor

actually, not going to bother atm with ideas around the WPTRunner still in flight

@panvapanva closed this Feb 16, 2023
@panva
panva deleted the wpt-update-status-files branch August 22, 2025 14:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@panva@nodejs-github-bot@joyeecheung