Skip to content

Commit

Permalink
Adds unit test for modern NPM handling
Browse files Browse the repository at this point in the history
  • Loading branch information
supernova-at committed Mar 2, 2021
1 parent 073246b commit bcae315
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/venia-concept/_buildpack/__tests__/create.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,16 @@ describe('when DEBUG_PROJECT_CREATION is set', () => {
'resolutions'
);
});

test.only('works with modern versions of NPM that spit out the tarball name', async () => {
// Arrange.
execSync
.mockReturnValueOnce(mockWorkspaceResponse)
.mockReturnValueOnce('unit_test.tgz');

// Act & Assert.
await expect(
runCreate(fs, { name: 'foo', author: 'bar', npmClient: 'yarn' })
).resolves.not.toThrow();
});
});

0 comments on commit bcae315

Please sign in to comment.