Skip to content

Commit

Permalink
fix: Fix a sneaked in bug
Browse files Browse the repository at this point in the history
Now the parsing and normalizing of arguments (including the "direct"
value) happens only in the main program file
"license-checker-rseidelsohn", so we have to use the parsed value here
where we directly call init() without using the main program file.
  • Loading branch information
RSeidelsohn committed Apr 15, 2023
1 parent 429d389 commit 8f738fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('main tests', function () {
checker.init(
{
start: path.join(__dirname, '../'),
direct: true,
direct: 0, // 0 is the parsed value passed to init from license-checker-rseidelsohn if set to true
},
function (err, sorted) {
output = sorted;
Expand All @@ -166,7 +166,7 @@ describe('main tests', function () {
// all and only the dependencies listed in the package.json should be included in the output,
// plus the main module itself
assert.ok(Object.keys(output).length === pkgDepsNumber + 1);
assert.equal(output['abbrev@1.0.9'], undefined);
assert.equal(typeof output['abbrev@1.0.9'], 'undefined');
});
});

Expand Down

0 comments on commit 8f738fb

Please sign in to comment.