Skip to content

Commit

Permalink
Simplify test now that problems is reproduceable.
Browse files Browse the repository at this point in the history
  • Loading branch information
totherik committed Jun 19, 2014
1 parent 47b91f1 commit 2f6258b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
});
});

Expand Down

0 comments on commit 2f6258b

Please sign in to comment.