From 4193f3bee5c8e55ca34cf3b65ba9bd78e69d5dac Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 22 Apr 2021 15:24:42 +0200 Subject: [PATCH] Remove log calls, fix tests --- build/document-extractor.js | 3 --- client/src/document/spec-table.tsx | 4 +++- testing/tests/index.test.js | 8 +++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build/document-extractor.js b/build/document-extractor.js index cadf0d11a290..a28b8bbb9f1e 100644 --- a/build/document-extractor.js +++ b/build/document-extractor.js @@ -434,9 +434,6 @@ function _addSingleSpecialSection($) { }) .filter(Boolean); - console.log("HERE!!"); - console.log(specifications); - return [ { type: "specifications", diff --git a/client/src/document/spec-table.tsx b/client/src/document/spec-table.tsx index cc2e8450d7f5..353cad864187 100644 --- a/client/src/document/spec-table.tsx +++ b/client/src/document/spec-table.tsx @@ -36,7 +36,9 @@ export function SpecificationTable({ {specifications.map((spec) => ( - {spec.title} + + {spec.title} ({spec.shortTitle}) + ))} diff --git a/testing/tests/index.test.js b/testing/tests/index.test.js index 3667cf21bfdc..428f7bad74dd 100644 --- a/testing/tests/index.test.js +++ b/testing/tests/index.test.js @@ -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"