Skip to content

Commit

Permalink
Add scenario comment from yarnpkg#4804
Browse files Browse the repository at this point in the history
  • Loading branch information
neonowy committed Oct 31, 2017
1 parent 88c19ad commit 54cb658
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __tests__/commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ test.concurrent('with two arguments and second argument "readme" shows readme st
});

test.concurrent('with two arguments and second argument "version" shows `latest` version', (): Promise<void> => {
// Scenario:
// If a registry contains versions [1.0.0, 1.0.1, 1.0.2] and latest:1.0.1
// If `yarn info` is run, it should choose `1.0.1` because it is "latest", not `1.0.2` even though it is newer.
// In other words, when no range is explicitely given, Yarn should choose "latest".
//
// In this test, `ui-select` has a max version of `0.20.0` but a `latest:0.19.8`
jest.mock('../__mocks__/request.js');

return runInfo(['ui-select', 'version'], {}, '', (config, output): ?Promise<void> => {
Expand Down

0 comments on commit 54cb658

Please sign in to comment.