summaryrefslogtreecommitdiff
path: root/test/doctool
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-01-10 20:43:57 +0100
committerAnna Henningsen <anna@addaleax.net>2017-02-24 02:06:31 +0100
commit7cbb4b0e6e821ba851dbe038dd05794f2e69047b (patch)
treea2a54868788e9653477496f2143963aa858b8757 /test/doctool
parent817b28b4e4cc35aa6c3e5ad3be37aafc0b539d45 (diff)
downloadnode-new-7cbb4b0e6e821ba851dbe038dd05794f2e69047b.tar.gz
tools,doc: enable changelogs for items
PR-URL: https://github.com/nodejs/node/pull/11489 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
Diffstat (limited to 'test/doctool')
-rw-r--r--test/doctool/test-doctool-html.js10
-rw-r--r--test/doctool/test-doctool-json.js15
2 files changed, 21 insertions, 4 deletions
diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js
index 442381b54d..a990d35507 100644
--- a/test/doctool/test-doctool-html.js
+++ b/test/doctool/test-doctool-html.js
@@ -47,7 +47,15 @@ const testData = [
'<p>Describe <code>Foobar</code> in more detail here.</p>' +
'<h2>Foobar II<span><a class="mark" href="#foo_foobar_ii" ' +
'id="foo_foobar_ii">#</a></span></h2>' +
- '<div class="api_metadata"><span>Added in: v5.3.0, v4.2.0</span></div> ' +
+ '<div class="api_metadata">' +
+ '<details class="changelog"><summary>History</summary>' +
+ '<table><tr><th>Version</th><th>Changes</th></tr>' +
+ '<tr><td>v5.3.0, v4.2.0</td>' +
+ '<td><p><span>Added in: v5.3.0, v4.2.0</span></p>' +
+ '</td></tr>' +
+ '<tr><td>v4.2.0</td><td><p>The <code>error</code> parameter can now be' +
+ 'an arrow function.</p></td></tr></table></details>' +
+ '</div> ' +
'<p>Describe <code>Foobar II</code> in more detail here.</p>' +
'<h2>Deprecated thingy<span><a class="mark" ' +
'href="#foo_deprecated_thingy" id="foo_deprecated_thingy">#</a>' +
diff --git a/test/doctool/test-doctool-json.js b/test/doctool/test-doctool-json.js
index ae7b2007b7..1019728f0f 100644
--- a/test/doctool/test-doctool-json.js
+++ b/test/doctool/test-doctool-json.js
@@ -89,7 +89,8 @@ const testData = [
textRaw: 'Foobar',
name: 'foobar',
meta: {
- added: ['v1.0.0']
+ added: ['v1.0.0'],
+ changes: []
},
desc: '<p>Describe <code>Foobar</code> in more detail ' +
'here.</p>\n',
@@ -100,7 +101,14 @@ const testData = [
textRaw: 'Foobar II',
name: 'foobar_ii',
meta: {
- added: ['v5.3.0', 'v4.2.0']
+ added: ['v5.3.0', 'v4.2.0'],
+ changes: [
+ { version: 'v4.2.0',
+ 'pr-url': 'https://github.com/nodejs/node/pull/3276',
+ description: 'The `error` parameter can now be ' +
+ 'an arrow function.'
+ }
+ ]
},
desc: '<p>Describe <code>Foobar II</code> in more detail ' +
'here.</p>\n',
@@ -112,7 +120,8 @@ const testData = [
name: 'deprecated_thingy',
meta: {
added: ['v1.0.0'],
- deprecated: ['v2.0.0']
+ deprecated: ['v2.0.0'],
+ changes: []
},
desc: '<p>Describe <code>Deprecated thingy</code> in more ' +
'detail here.</p>\n',