From 2f6258bcc3259ada5a2dce330912ddf2e306fb26 Mon Sep 17 00:00:00 2001 From: ertoth Date: Thu, 19 Jun 2014 16:26:20 -0700 Subject: [PATCH] Simplify test now that problems is reproduceable. --- test/index.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/test/index.js b/test/index.js index 217d32e..edd253a 100644 --- a/test/index.js +++ b/test/index.js @@ -332,26 +332,13 @@ test('shortstop', function (t) { t.test('preserve buffers', function (t) { var resolver; - function file(value, cb) { - require('fs').readFile(value, cb); - } - resolver = shortstop.create(); - resolver.use('file', file); - resolver.resolve({ buffer: 'file:./index.js' }, function (err, data) { + resolver.resolve({ buffer: new Buffer(0) }, function (err, data) { t.error(err); t.ok(data); t.ok(data.buffer); t.ok(Buffer.isBuffer(data.buffer)); - - resolver = shortstop.create(); - resolver.resolve(data, function (err, data) { - t.error(err); - t.ok(data); - t.ok(data.buffer); - t.ok(Buffer.isBuffer(data.buffer)); - t.end(); - }); + t.end() }); });