Skip to content

Commit

Permalink
fix: ensure use of latest list-installed
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Mar 22, 2024
1 parent 09c6ed1 commit 76439fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@voxpelli/semver-set": "^5.0.2",
"@voxpelli/typed-utils": "^1.6.0",
"is-glob": "^4.0.3",
"list-installed": "^5.1.1",
"list-installed": "^5.1.2",
"picomatch": "^4.0.1",
"semver": "^7.6.0"
},
Expand Down
7 changes: 5 additions & 2 deletions test/installed-check.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ describe('installedCheck()', () => {
.should.be.rejectedWith(/Failed to read package\.json/);
});

it('should error on inability to list installed modules', async () => {
it('should not error on missing node_modules', async () => {
await installedCheck(['engine', 'version'], {
cwd: join(import.meta.url, 'fixtures/missing-node-modules'),
})
.should.be.rejectedWith(/Failed to list installed modules/);
.should.eventually.deep.equal({
errors: ["foo: Dependency is not installed. Can't check its version"],
warnings: ["foo: Dependency is not installed. Can't check its requirements"],
});
});
});

Expand Down

0 comments on commit 76439fc

Please sign in to comment.