Skip to content

Commit

Permalink
Update conformance page to ES14 (#3274)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 authored Sep 13, 2023
1 parent 82efa6f commit eb3fd5e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions test262/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ <h2 class="card-title">Older versions</h2>
<div class="form-group">
<select class="form-select" id="info-options-es-version">
<option value="255" selected>All</option>
<option value="14">ES14</option>
<option value="13">ES13</option>
<option value="12">ES12</option>
<option value="11">ES11</option>
Expand Down
2 changes: 1 addition & 1 deletion test262/refs/heads/main/latest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test262/refs/tags/v0.17/latest.json

Large diffs are not rendered by default.

25 changes: 24 additions & 1 deletion test262/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,35 @@ function addSuite(suite, parentID, namespace, upstream) {
return hasTests || hasSubSuites;
}

function findStats(suite) {
if (esVersion >= 255) {
return suite.a;
}

const versioned_stats = suite.av;
if (!versioned_stats) {
return suite.a;
}

let version = esVersion;

while (version >= 5) {
if (versioned_stats["es" + version]) {
return versioned_stats["es" + version];
}

version -= 1;
}

return suite.a;
}


if (!shouldDisplaySuite(suite)) {
return;
}

const stats = suite?.av?.["es" + esVersion] ?? suite.a;
const stats = findStats(suite);
const tests = suite.t ? suite.t.filter(shouldDisplayTest) : [];
const subSuites = suite.s ?? [];

Expand Down

0 comments on commit eb3fd5e

Please sign in to comment.