| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f2ce6c commit 37f3642
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -358,9 +358,9 @@ try { | |||
| 358 | 358 | assert.equal(true, threw, | |
| 359 | 359 | 'a.doesNotThrow is not catching type matching errors'); | |
| 360 | 360 | ||
| 361 | - assert.throws(function() {assert.ifError(new Error('test error'));}); | ||
| 362 | - assert.doesNotThrow(function() {assert.ifError(null);}); | ||
| 363 | - assert.doesNotThrow(function() {assert.ifError();}); | ||
| 361 | + assert.throws(function() { assert.ifError(new Error('test error')); }); | ||
| 362 | + assert.doesNotThrow(function() { assert.ifError(null); }); | ||
| 363 | + assert.doesNotThrow(function() { assert.ifError(); }); | ||
| 364 | 364 | ||
| 365 | 365 | assert.throws(() => { | |
| 366 | 366 | assert.doesNotThrow(makeBlock(thrower, Error), 'user message'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1020,7 +1020,7 @@ assert.throws(() => Buffer.from('', 'buffer'), TypeError); | |||
| 1020 | 1020 | { | |
| 1021 | 1021 | let a = [0]; | |
| 1022 | 1022 | for (let i = 0; i < 7; ++i) a = a.concat(a); | |
| 1023 | - a = a.map((_, i) => {return i;}); | ||
| 1023 | + a = a.map((_, i) => { return i; }); | ||
| 1024 | 1024 | const b = Buffer.from(a); | |
| 1025 | 1025 | const c = Buffer.from(b); | |
| 1026 | 1026 | assert.strictEqual(b.length, a.length); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,15 +26,15 @@ var sentExit = false; | |||
| 26 | 26 | proc.stdout.on('data', (data) => { | |
| 27 | 27 | stdout += data; | |
| 28 | 28 | if (!sentCommand && stdout.includes('> 1')) { | |
| 29 | - setImmediate(() => {proc.stdin.write('n\n');}); | ||
| 29 | + setImmediate(() => { proc.stdin.write('n\n'); }); | ||
| 30 | 30 | return sentCommand = true; | |
| 31 | 31 | } | |
| 32 | 32 | if (!sentEmpty && stdout.includes('> 3')) { | |
| 33 | - setImmediate(() => {proc.stdin.write('\n');}); | ||
| 33 | + setImmediate(() => { proc.stdin.write('\n'); }); | ||
| 34 | 34 | return sentEmpty = true; | |
| 35 | 35 | } | |
| 36 | 36 | if (!sentExit && sentCommand && sentEmpty) { | |
| 37 | - setTimeout(() => {proc.stdin.write('\n\n\n.exit\n\n\n');}, 1); | ||
| 37 | + setTimeout(() => { proc.stdin.write('\n\n\n.exit\n\n\n'); }, 1); | ||
| 38 | 38 | return sentExit = true; | |
| 39 | 39 | } | |
| 40 | 40 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,7 +87,7 @@ function test_simple_relative_symlink(callback) { | |||
| 87 | 87 | [ | |
| 88 | 88 | [entry, '../' + common.tmpDirName + '/cycles/root.js'] | |
| 89 | 89 | ].forEach(function(t) { | |
| 90 | - try {fs.unlinkSync(t[0]);} catch (e) {} | ||
| 90 | + try { fs.unlinkSync(t[0]); } catch (e) {} | ||
| 91 | 91 | console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file'); | |
| 92 | 92 | fs.symlinkSync(t[1], t[0], 'file'); | |
| 93 | 93 | unlink.push(t[0]); | |
@@ -113,7 +113,7 @@ function test_simple_absolute_symlink(callback) { | |||
| 113 | 113 | [ | |
| 114 | 114 | [entry, expected] | |
| 115 | 115 | ].forEach(function(t) { | |
| 116 | - try {fs.unlinkSync(t[0]);} catch (e) {} | ||
| 116 | + try { fs.unlinkSync(t[0]); } catch (e) {} | ||
| 117 | 117 | console.error('fs.symlinkSync(%j, %j, %j)', t[1], t[0], type); | |
| 118 | 118 | fs.symlinkSync(t[1], t[0], type); | |
| 119 | 119 | unlink.push(t[0]); | |
@@ -138,13 +138,13 @@ function test_deep_relative_file_symlink(callback) { | |||
| 138 | 138 | expected); | |
| 139 | 139 | const linkPath1 = path.join(targetsAbsDir, | |
| 140 | 140 | 'nested-index', 'one', 'symlink1.js'); | |
| 141 | - try {fs.unlinkSync(linkPath1);} catch (e) {} | ||
| 141 | + try { fs.unlinkSync(linkPath1); } catch (e) {} | ||
| 142 | 142 | fs.symlinkSync(linkData1, linkPath1, 'file'); | |
| 143 | 143 | ||
| 144 | 144 | const linkData2 = '../one/symlink1.js'; | |
| 145 | 145 | const entry = path.join(targetsAbsDir, | |
| 146 | 146 | 'nested-index', 'two', 'symlink1-b.js'); | |
| 147 | - try {fs.unlinkSync(entry);} catch (e) {} | ||
| 147 | + try { fs.unlinkSync(entry); } catch (e) {} | ||
| 148 | 148 | fs.symlinkSync(linkData2, entry, 'file'); | |
| 149 | 149 | unlink.push(linkPath1); | |
| 150 | 150 | unlink.push(entry); | |
@@ -165,13 +165,13 @@ function test_deep_relative_dir_symlink(callback) { | |||
| 165 | 165 | const path1b = path.join(targetsAbsDir, 'nested-index', 'one'); | |
| 166 | 166 | const linkPath1b = path.join(path1b, 'symlink1-dir'); | |
| 167 | 167 | const linkData1b = path.relative(path1b, expected); | |
| 168 | - try {fs.unlinkSync(linkPath1b);} catch (e) {} | ||
| 168 | + try { fs.unlinkSync(linkPath1b); } catch (e) {} | ||
| 169 | 169 | fs.symlinkSync(linkData1b, linkPath1b, 'dir'); | |
| 170 | 170 | ||
| 171 | 171 | const linkData2b = '../one/symlink1-dir'; | |
| 172 | 172 | const entry = path.join(targetsAbsDir, | |
| 173 | 173 | 'nested-index', 'two', 'symlink12-dir'); | |
| 174 | - try {fs.unlinkSync(entry);} catch (e) {} | ||
| 174 | + try { fs.unlinkSync(entry); } catch (e) {} | ||
| 175 | 175 | fs.symlinkSync(linkData2b, entry, 'dir'); | |
| 176 | 176 | unlink.push(linkPath1b); | |
| 177 | 177 | unlink.push(entry); | |
@@ -195,7 +195,7 @@ function test_cyclic_link_protection(callback) { | |||
| 195 | 195 | [common.tmpDir + '/cycles/realpath-3b', '../cycles/realpath-3c'], | |
| 196 | 196 | [common.tmpDir + '/cycles/realpath-3c', '../cycles/realpath-3a'] | |
| 197 | 197 | ].forEach(function(t) { | |
| 198 | - try {fs.unlinkSync(t[0]);} catch (e) {} | ||
| 198 | + try { fs.unlinkSync(t[0]); } catch (e) {} | ||
| 199 | 199 | fs.symlinkSync(t[1], t[0], 'dir'); | |
| 200 | 200 | unlink.push(t[0]); | |
| 201 | 201 | }); | |
@@ -218,7 +218,7 @@ function test_cyclic_link_overprotection(callback) { | |||
| 218 | 218 | const link = folder + '/cycles'; | |
| 219 | 219 | var testPath = cycles; | |
| 220 | 220 | testPath += '/folder/cycles'.repeat(10); | |
| 221 | - try {fs.unlinkSync(link);} catch (ex) {} | ||
| 221 | + try { fs.unlinkSync(link); } catch (ex) {} | ||
| 222 | 222 | fs.symlinkSync(cycles, link, 'dir'); | |
| 223 | 223 | unlink.push(link); | |
| 224 | 224 | assertEqualPath(fs.realpathSync(testPath), path.resolve(expected)); | |
@@ -246,7 +246,7 @@ function test_relative_input_cwd(callback) { | |||
| 246 | 246 | ].forEach(function(t) { | |
| 247 | 247 | const fn = t[0]; | |
| 248 | 248 | console.error('fn=%j', fn); | |
| 249 | - try {fs.unlinkSync(fn);} catch (e) {} | ||
| 249 | + try { fs.unlinkSync(fn); } catch (e) {} | ||
| 250 | 250 | const b = path.basename(t[1]); | |
| 251 | 251 | const type = (b === 'root.js' ? 'file' : 'dir'); | |
| 252 | 252 | console.log('fs.symlinkSync(%j, %j, %j)', t[1], fn, type); | |
@@ -363,7 +363,7 @@ function test_up_multiple(cb) { | |||
| 363 | 363 | ['a/b', | |
| 364 | 364 | 'a' | |
| 365 | 365 | ].forEach(function(folder) { | |
| 366 | - try {fs.rmdirSync(tmp(folder));} catch (ex) {} | ||
| 366 | + try { fs.rmdirSync(tmp(folder)); } catch (ex) {} | ||
| 367 | 367 | }); | |
| 368 | 368 | } | |
| 369 | 369 | function setup() { | |
@@ -420,14 +420,14 @@ function test_abs_with_kids(cb) { | |||
| 420 | 420 | ['/a/b/c/x.txt', | |
| 421 | 421 | '/a/link' | |
| 422 | 422 | ].forEach(function(file) { | |
| 423 | - try {fs.unlinkSync(root + file);} catch (ex) {} | ||
| 423 | + try { fs.unlinkSync(root + file); } catch (ex) {} | ||
| 424 | 424 | }); | |
| 425 | 425 | ['/a/b/c', | |
| 426 | 426 | '/a/b', | |
| 427 | 427 | '/a', | |
| 428 | 428 | '' | |
| 429 | 429 | ].forEach(function(folder) { | |
| 430 | - try {fs.rmdirSync(root + folder);} catch (ex) {} | ||
| 430 | + try { fs.rmdirSync(root + folder); } catch (ex) {} | ||
| 431 | 431 | }); | |
| 432 | 432 | } | |
| 433 | 433 | function setup() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ server.listen(0, function() { | |||
| 25 | 25 | port: this.address().port | |
| 26 | 26 | }, function(x) { | |
| 27 | 27 | x.setEncoding('utf8'); | |
| 28 | - x.on('data', function(c) {data += c;}); | ||
| 28 | + x.on('data', function(c) { data += c; }); | ||
| 29 | 29 | x.on('error', function(e) { | |
| 30 | 30 | throw e; | |
| 31 | 31 | }); | |
@@ -37,7 +37,7 @@ server.listen(0, function() { | |||
| 37 | 37 | server.close(); | |
| 38 | 38 | }); | |
| 39 | 39 | }); | |
| 40 | - get.on('error', function(e) {throw e;}); | ||
| 40 | + get.on('error', function(e) { throw e; }); | ||
| 41 | 41 | get.end(); | |
| 42 | 42 | ||
| 43 | 43 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,5 +3,5 @@ require('../common'); | |||
| 3 | 3 | var assert = require('assert'); | |
| 4 | 4 | var v8 = require('v8'); | |
| 5 | 5 | ||
| 6 | - assert.throws(function() {v8.setFlagsFromString(1);}, TypeError); | ||
| 7 | - assert.throws(function() {v8.setFlagsFromString();}, TypeError); | ||
| 6 | + assert.throws(function() { v8.setFlagsFromString(1); }, TypeError); | ||
| 7 | + assert.throws(function() { v8.setFlagsFromString(); }, TypeError); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments