[Pkg-javascript-commits] [node-stream-http] 11/208: Clean up basic test

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 13 13:39:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-stream-http.

commit a0c13a0a4164e3a267c1d16774101c25659ba835
Author: John Hiesey <john at hiesey.com>
Date:   Thu Jul 2 00:50:43 2015 -0700

    Clean up basic test
---
 test/tests/basic.js | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/test/tests/basic.js b/test/tests/basic.js
index 1294727..ccc3734 100644
--- a/test/tests/basic.js
+++ b/test/tests/basic.js
@@ -1,37 +1,22 @@
-var test = require('tape')
-// var crypto = require('crypto')
-var hashes = require('./hashes.json')
 var Buffer = require('buffer').Buffer
-// var sha1 = require('simple-sha1')
-
 var fs = require('fs');
+var test = require('tape')
+
 var reference = fs.readFileSync(__dirname + '/../server/static/basic.txt');
 
 var http = require('../..')
 
 test('basic functionality', function (t) {
-	// var hash = crypto.createHash('sha256')
-	// hash.setEncoding('hex')
-
 	http.get('/basic.txt', function (res) {
-		// var hash = crypto.createHash('sha256')
-		// hash.setEncoding('hex')
-
 		var buffers = []
 
 		res.on('end', function () {
-			// console.warn('end')
-			// hash.end()
 			t.ok(reference.equals(Buffer.concat(buffers)), 'contents match')
 			t.end()
 		})
 
 		res.on('data', function (data) {
-			// console.warn('data')
-			// console.log(data.toString('utf-8'))
 			buffers.push(data)
 		})
-
-		// res.pipe(hash)
 	})
 })
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git



More information about the Pkg-javascript-commits mailing list