Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes tests
  • Loading branch information
arcanis committed Mar 31, 2022
commit d4f4862893deee10cd7296ce57d3b9974255bbda
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ describe(`Features`, () => {

await xfs.writeJsonPromise(manifestPath, manifestData);

throw new Error(42);

const check = run(`install`, `--check-resolutions`);
if (valid) {
await check;
Expand Down
13 changes: 8 additions & 5 deletions packages/plugin-npm/tests/NpmSemverResolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ describe(`NpmSemverResolver`, () => {
it(`should match when the reference contains a __archiveUrl`, async () => {
const resolver = new NpmSemverResolver();

const reference = `npm:1.0.0::__archiveUrl=foo.tgz`;
const ident = structUtils.makeIdent(null, `foo`);
const descriptor = structUtils.makeDescriptor(ident, `npm:*`);
const locator = structUtils.makeLocator(ident, `npm:1.0.0::__archiveUrl=foo.tgz`);

const results = await resolver.getSatisfying(
structUtils.makeDescriptor(structUtils.makeIdent(null, `foo`), `*`),
[reference],
descriptor,
{},
[locator],
null as any,
);

expect(results.length).toEqual(1);
expect(results[0].reference).toEqual(reference);
expect(results.locators.length).toEqual(1);
expect(results.locators[0].locatorHash).toEqual(locator.locatorHash);
});
});
});