Skip to content

Commit

Permalink
freelist: simplify export
Browse files Browse the repository at this point in the history
PR-URL: #12644
Reviewed-By: Brian White <[email protected]>
  • Loading branch information
jasnell committed May 1, 2017
1 parent 08809f2 commit ea9eed5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/_http_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const binding = process.binding('http_parser');
const methods = binding.methods;
const HTTPParser = binding.HTTPParser;

const FreeList = require('internal/freelist').FreeList;
const FreeList = require('internal/freelist');
const ondrain = require('internal/http').ondrain;
const incoming = require('_http_incoming');
const IncomingMessage = incoming.IncomingMessage;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/freelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ class FreeList {
}
}

module.exports = {FreeList};
module.exports = FreeList;
7 changes: 3 additions & 4 deletions test/parallel/test-freelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

require('../common');
const assert = require('assert');
const freelist = require('internal/freelist');
const FreeList = require('internal/freelist');

assert.strictEqual(typeof freelist, 'object');
assert.strictEqual(typeof freelist.FreeList, 'function');
assert.strictEqual(typeof FreeList, 'function');

const flist1 = new freelist.FreeList('flist1', 3, String);
const flist1 = new FreeList('flist1', 3, String);

// Allocating when empty, should not change the list size
const result = flist1.alloc('test');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-internal-modules-expose.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ const config = process.binding('config');

console.log(config, process.argv);

assert.strictEqual(typeof require('internal/freelist').FreeList, 'function');
assert.strictEqual(typeof require('internal/freelist'), 'function');
assert.strictEqual(config.exposeInternals, true);

0 comments on commit ea9eed5

Please sign in to comment.