| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b87ee26 commit 76bb3cb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,8 +45,8 @@ function run() { | |||
| 45 | 45 | var fn = next[1]; | |
| 46 | 46 | console.log('# %s', name); | |
| 47 | 47 | fn({ | |
| 48 | - same: assert.deepEqual, | ||
| 49 | - equal: assert.equal, | ||
| 48 | + same: assert.deepStrictEqual, | ||
| 49 | + equal: assert.strictEqual, | ||
| 50 | 50 | end: function() { | |
| 51 | 51 | count--; | |
| 52 | 52 | run(); | |
@@ -56,7 +56,7 @@ function run() { | |||
| 56 | 56 | ||
| 57 | 57 | // ensure all tests have run | |
| 58 | 58 | process.on('exit', function() { | |
| 59 | - assert.equal(count, 0); | ||
| 59 | + assert.strictEqual(count, 0); | ||
| 60 | 60 | }); | |
| 61 | 61 | ||
| 62 | 62 | process.nextTick(run); | |
@@ -136,17 +136,17 @@ test('write bufferize', function(t) { | |||
| 136 | 136 | }); | |
| 137 | 137 | ||
| 138 | 138 | var encodings = | |
| 139 | - [ 'hex', | ||
| 140 | - 'utf8', | ||
| 141 | - 'utf-8', | ||
| 142 | - 'ascii', | ||
| 143 | - 'binary', | ||
| 144 | - 'base64', | ||
| 145 | - 'ucs2', | ||
| 146 | - 'ucs-2', | ||
| 147 | - 'utf16le', | ||
| 148 | - 'utf-16le', | ||
| 149 | - undefined ]; | ||
| 139 | + [ 'hex', | ||
| 140 | + 'utf8', | ||
| 141 | + 'utf-8', | ||
| 142 | + 'ascii', | ||
| 143 | + 'binary', | ||
| 144 | + 'base64', | ||
| 145 | + 'ucs2', | ||
| 146 | + 'ucs-2', | ||
| 147 | + 'utf16le', | ||
| 148 | + 'utf-16le', | ||
| 149 | + undefined ]; | ||
| 150 | 150 | ||
| 151 | 151 | tw.on('finish', function() { | |
| 152 | 152 | t.same(tw.buffer, chunks, 'got the expected chunks'); | |
@@ -173,17 +173,17 @@ test('write no bufferize', function(t) { | |||
| 173 | 173 | }; | |
| 174 | 174 | ||
| 175 | 175 | var encodings = | |
| 176 | - [ 'hex', | ||
| 177 | - 'utf8', | ||
| 178 | - 'utf-8', | ||
| 179 | - 'ascii', | ||
| 180 | - 'binary', | ||
| 181 | - 'base64', | ||
| 182 | - 'ucs2', | ||
| 183 | - 'ucs-2', | ||
| 184 | - 'utf16le', | ||
| 185 | - 'utf-16le', | ||
| 186 | - undefined ]; | ||
| 176 | + [ 'hex', | ||
| 177 | + 'utf8', | ||
| 178 | + 'utf-8', | ||
| 179 | + 'ascii', | ||
| 180 | + 'binary', | ||
| 181 | + 'base64', | ||
| 182 | + 'ucs2', | ||
| 183 | + 'ucs-2', | ||
| 184 | + 'utf16le', | ||
| 185 | + 'utf-16le', | ||
| 186 | + undefined ]; | ||
| 187 | 187 | ||
| 188 | 188 | tw.on('finish', function() { | |
| 189 | 189 | t.same(tw.buffer, chunks, 'got the expected chunks'); | |
@@ -199,7 +199,7 @@ test('write no bufferize', function(t) { | |||
| 199 | 199 | ||
| 200 | 200 | test('write callbacks', function(t) { | |
| 201 | 201 | var callbacks = chunks.map(function(chunk, i) { | |
| 202 | - return [i, function(er) { | ||
| 202 | + return [i, function() { | ||
| 203 | 203 | callbacks._called[i] = chunk; | |
| 204 | 204 | }]; | |
| 205 | 205 | }).reduce(function(set, x) { | |
@@ -270,7 +270,7 @@ test('end callback called after write callback', function(t) { | |||
| 270 | 270 | test('encoding should be ignored for buffers', function(t) { | |
| 271 | 271 | var tw = new W(); | |
| 272 | 272 | var hex = '018b5e9a8f6236ffe30e31baf80d2cf6eb'; | |
| 273 | - tw._write = function(chunk, encoding, cb) { | ||
| 273 | + tw._write = function(chunk) { | ||
| 274 | 274 | t.equal(chunk.toString('hex'), hex); | |
| 275 | 275 | t.end(); | |
| 276 | 276 | }; | |
@@ -282,7 +282,7 @@ test('writables are not pipable', function(t) { | |||
| 282 | 282 | var w = new W(); | |
| 283 | 283 | w._write = function() {}; | |
| 284 | 284 | var gotError = false; | |
| 285 | - w.on('error', function(er) { | ||
| 285 | + w.on('error', function() { | ||
| 286 | 286 | gotError = true; | |
| 287 | 287 | }); | |
| 288 | 288 | w.pipe(process.stdout); | |
@@ -295,7 +295,7 @@ test('duplexes are pipable', function(t) { | |||
| 295 | 295 | d._read = function() {}; | |
| 296 | 296 | d._write = function() {}; | |
| 297 | 297 | var gotError = false; | |
| 298 | - d.on('error', function(er) { | ||
| 298 | + d.on('error', function() { | ||
| 299 | 299 | gotError = true; | |
| 300 | 300 | }); | |
| 301 | 301 | d.pipe(process.stdout); | |
@@ -329,7 +329,7 @@ test('dont end while writing', function(t) { | |||
| 329 | 329 | setTimeout(function() { | |
| 330 | 330 | this.writing = false; | |
| 331 | 331 | cb(); | |
| 332 | - }); | ||
| 332 | + }, 1); | ||
| 333 | 333 | }; | |
| 334 | 334 | w.on('finish', function() { | |
| 335 | 335 | assert(wrote); | |
@@ -366,7 +366,7 @@ test('finish does not come before sync _write cb', function(t) { | |||
| 366 | 366 | assert(writeCb); | |
| 367 | 367 | t.end(); | |
| 368 | 368 | }); | |
| 369 | - w.write(Buffer(0), function(er) { | ||
| 369 | + w.write(Buffer.alloc(0), function() { | ||
| 370 | 370 | writeCb = true; | |
| 371 | 371 | }); | |
| 372 | 372 | w.end(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments