Skip to content

Commit

Permalink
Remove log calls, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Elchi3 committed Apr 22, 2021
1 parent 9ebb3a9 commit 4193f3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions build/document-extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,6 @@ function _addSingleSpecialSection($) {
})
.filter(Boolean);

console.log("HERE!!");
console.log(specifications);

return [
{
type: "specifications",
Expand Down
4 changes: 3 additions & 1 deletion client/src/document/spec-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export function SpecificationTable({
{specifications.map((spec) => (
<tr key={spec.bcdSpecificationURL}>
<td>
<a href={spec.bcdSpecificationURL}>{spec.title}</a>
<a href={spec.bcdSpecificationURL}>
{spec.title} ({spec.shortTitle})
</a>
</td>
</tr>
))}
Expand Down
8 changes: 3 additions & 5 deletions testing/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,14 +1032,12 @@ test("specification table and bcd extraction", () => {
const { doc } = JSON.parse(fs.readFileSync(jsonFile));
expect(doc.body[0].type).toBe("prose");
expect(doc.body[1].type).toBe("specifications");
expect(doc.body[1].value.specifications[0].url).toBe(
"https://tc39.es/ecma262/"
);
expect(doc.body[1].value.specifications[0].shortTitle).toBe("ECMAScript");
expect(doc.body[1].value.specifications[0].bcdSpecificationURL).toBe(
"https://tc39.es/ecma262/#sec-array.prototype.tolocalestring"
);
expect(doc.body[1].value.specifications[1].url).toBe(
"https://tc39.es/ecma402/"
expect(doc.body[1].value.specifications[1].shortTitle).toBe(
"ECMAScript Internationalization API"
);
expect(doc.body[1].value.specifications[1].bcdSpecificationURL).toBe(
"https://tc39.es/ecma402/#sup-array.prototype.tolocalestring"
Expand Down

0 comments on commit 4193f3b

Please sign in to comment.