GeezerVison is showing github.com — test: add trailing commas in `test/pummel` · nodejs/node@a2b103a
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/.eslintrc.yaml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -76,7 +76,6 @@ overrides: | 76 | 76 | - es-module/*.mjs | 77 | 77 | - parallel/*.js | 78 | 78 | - parallel/*.mjs | 79 | | - - pummel/*.js | 80 | 79 | - sequential/*.js | 81 | 80 | - sequential/*.mjs | 82 | 81 | rules: | |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-crypto-timing-safe-equal-benchmarks.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -108,7 +108,7 @@ const T_THRESHOLD = 3.892; | 108 | 108 | const t = getTValue(crypto.timingSafeEqual); | 109 | 109 | assert( | 110 | 110 | Math.abs(t) < T_THRESHOLD, | 111 | | - `timingSafeEqual should not leak information from its execution time (t=${t})` | | 111 | + `timingSafeEqual should not leak information from its execution time (t=${t})`, | 112 | 112 | ); | 113 | 113 |
| 114 | 114 | // As a coherence check to make sure the statistical tests are working, run the | @@ -118,5 +118,5 @@ const unsafeCompare = (bufA, bufB) => bufA.equals(bufB); | 118 | 118 | const t2 = getTValue(unsafeCompare); | 119 | 119 | assert( | 120 | 120 | Math.abs(t2) > T_THRESHOLD, | 121 | | - `Buffer#equals should leak information from its execution time (t=${t2})` | | 121 | + `Buffer#equals should leak information from its execution time (t=${t2})`, | 122 | 122 | ); |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-dh-regr.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,6 +54,6 @@ for (let i = 0; i < 2000; i++) { | 54 | 54 | bSecret, | 55 | 55 | 'Secrets should be equal.\n' + | 56 | 56 | `aSecret: ${aSecret.toString('base64')}\n` + | 57 | | - `bSecret: ${bSecret.toString('base64')}` | | 57 | + `bSecret: ${bSecret.toString('base64')}`, | 58 | 58 | ); | 59 | 59 | } |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-fs-readfile-tostring-fail.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ tmpdir.refresh(); | 18 | 18 |
| 19 | 19 | const file = path.join(tmpdir.path, 'toobig.txt'); | 20 | 20 | const stream = fs.createWriteStream(file, { | 21 | | - flags: 'a' | | 21 | + flags: 'a', | 22 | 22 | }); | 23 | 23 |
| 24 | 24 | stream.on('error', (err) => { throw err; }); | @@ -44,7 +44,7 @@ stream.on('finish', common.mustCall(function() { | 44 | 44 | message: 'Cannot create a string longer than ' + | 45 | 45 | `0x${stringLengthHex} characters`, | 46 | 46 | code: 'ERR_STRING_TOO_LONG', | 47 | | - name: 'Error' | | 47 | + name: 'Error', | 48 | 48 | })(err); | 49 | 49 | } | 50 | 50 | assert.strictEqual(buf, undefined); | |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-fs-watch-file.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -58,7 +58,7 @@ fs.writeFileSync(filepathOne, 'hello'); | 58 | 58 |
| 59 | 59 | assert.throws( | 60 | 60 | () => { fs.watchFile(filepathOne); }, | 61 | | - { code: 'ERR_INVALID_ARG_TYPE' } | | 61 | + { code: 'ERR_INVALID_ARG_TYPE' }, | 62 | 62 | ); | 63 | 63 |
| 64 | 64 | // Does not throw. | @@ -78,7 +78,7 @@ fs.writeFileSync(filepathTwoAbs, 'howdy'); | 78 | 78 |
| 79 | 79 | assert.throws( | 80 | 80 | () => { fs.watchFile(filepathTwo); }, | 81 | | - { code: 'ERR_INVALID_ARG_TYPE' } | | 81 | + { code: 'ERR_INVALID_ARG_TYPE' }, | 82 | 82 | ); | 83 | 83 |
| 84 | 84 | { // Does not throw. | |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-heapdump-dns.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,6 +14,6 @@ validateSnapshotNodes('Node / ChannelWrap', [ | 14 | 14 | // `Node / ChannelWrap` (C++) -> `ChannelWrap` (JS) | 15 | 15 | { node_name: 'ChannelWrap', edge_name: 'native_to_javascript' }, | 16 | 16 | ], | 17 | | - detachedness: 2 | | 17 | + detachedness: 2, | 18 | 18 | }, | 19 | 19 | ]); |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-heapdump-env.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ validateSnapshotNodes('Node / Environment', [{ | 18 | 18 | { node_name: 'Node / CleanupQueue', edge_name: 'cleanup_queue' }, | 19 | 19 | { node_name: 'Node / IsolateData', edge_name: 'isolate_data' }, | 20 | 20 | { node_name: 'Node / Realm', edge_name: 'principal_realm' }, | 21 | | - ] | | 21 | + ], | 22 | 22 | }]); | 23 | 23 |
| 24 | 24 | validateSnapshotNodes('Node / CleanupQueue', [ | @@ -28,14 +28,14 @@ validateSnapshotNodes('Node / CleanupQueue', [ | 28 | 28 | { | 29 | 29 | children: [ | 30 | 30 | { node_name: 'Node / ContextifyScript' }, | 31 | | - ] | | 31 | + ], | 32 | 32 | }, | 33 | 33 | ]); | 34 | 34 |
| 35 | 35 | validateSnapshotNodes('Node / Realm', [{ | 36 | 36 | children: [ | 37 | 37 | { node_name: 'process', edge_name: 'process_object' }, | 38 | | - ] | | 38 | + ], | 39 | 39 | }]); | 40 | 40 |
| 41 | 41 | console.log(context); // Make sure it's not GC'ed |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-heapdump-fs-promise.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,6 +11,6 @@ validateSnapshotNodes('Node / FSReqPromise', [ | 11 | 11 | children: [ | 12 | 12 | { node_name: 'FSReqPromise', edge_name: 'native_to_javascript' }, | 13 | 13 | { node_name: 'Float64Array', edge_name: 'stats_field_array' }, | 14 | | - ] | | 14 | + ], | 15 | 15 | }, | 16 | 16 | ]); |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-heapdump-http2.js +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,7 +29,7 @@ server.listen(0, () => { | 29 | 29 | children: [ | 30 | 30 | // current_headers and/or queue could be empty | 31 | 31 | { node_name: 'Http2Stream', edge_name: 'native_to_javascript' }, | 32 | | - ] | | 32 | + ], | 33 | 33 | }, | 34 | 34 | ], { loose: true }); | 35 | 35 |
| @@ -39,29 +39,29 @@ server.listen(0, () => { | 39 | 39 | children: [ | 40 | 40 | { node_name: 'FileHandle', edge_name: 'native_to_javascript' }, | 41 | 41 | // current_headers could be empty | 42 | | - ] | | 42 | + ], | 43 | 43 | }, | 44 | 44 | ], { loose: true }); | 45 | 45 | state.validateSnapshotNodes('Node / TCPSocketWrap', [ | 46 | 46 | { | 47 | 47 | children: [ | 48 | 48 | { node_name: 'TCP', edge_name: 'native_to_javascript' }, | 49 | | - ] | | 49 | + ], | 50 | 50 | }, | 51 | 51 | ], { loose: true }); | 52 | 52 | state.validateSnapshotNodes('Node / TCPServerWrap', [ | 53 | 53 | { | 54 | 54 | children: [ | 55 | 55 | { node_name: 'TCP', edge_name: 'native_to_javascript' }, | 56 | | - ] | | 56 | + ], | 57 | 57 | }, | 58 | 58 | ], { loose: true }); | 59 | 59 | // `Node / StreamPipe` (C++) -> StreamPipe (JS) | 60 | 60 | state.validateSnapshotNodes('Node / StreamPipe', [ | 61 | 61 | { | 62 | 62 | children: [ | 63 | 63 | { node_name: 'StreamPipe', edge_name: 'native_to_javascript' }, | 64 | | - ] | | 64 | + ], | 65 | 65 | }, | 66 | 66 | ]); | 67 | 67 | // `Node / Http2Session` (C++) -> Http2Session (JS) | @@ -71,11 +71,11 @@ server.listen(0, () => { | 71 | 71 | { node_name: 'Http2Session', edge_name: 'native_to_javascript' }, | 72 | 72 | { node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' }, | 73 | 73 | { | 74 | | - node_name: 'Node / streams', edge_name: 'streams' | | 74 | + node_name: 'Node / streams', edge_name: 'streams', | 75 | 75 | }, | 76 | 76 | // outstanding_pings, outgoing_buffers, outgoing_storage, | 77 | 77 | // pending_rst_streams could be empty | 78 | | - ] | | 78 | + ], | 79 | 79 | }, | 80 | 80 | ], { loose: true }); | 81 | 81 | })); | |
Collapse file Copy file name to clipboardExpand all lines: test/pummel/test-heapdump-inspector.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ const inspector = require('inspector'); | 10 | 10 | const snapshotNode = { | 11 | 11 | children: [ | 12 | 12 | { node_name: 'Node / InspectorSession', edge_name: 'session' }, | 13 | | - ] | | 13 | + ], | 14 | 14 | }; | 15 | 15 |
| 16 | 16 | // Starts with no JSBindingsConnection (or 1 if coverage enabled). | @@ -34,7 +34,7 @@ const snapshotNode = { | 34 | 34 | (edge) => edge.name === 'callback' && | 35 | 35 | (edge.to.type === undefined || // embedded graph | 36 | 36 | edge.to.type === 'closure'), // snapshot | 37 | | - ] | | 37 | + ], | 38 | 38 | }, | 39 | 39 | ]; | 40 | 40 | if (process.env.NODE_V8_COVERAGE) { | |
|